Skip to main content
When you need to quickly try out or debug an agent, the agentscope.console module lets you chat with it and inspect its full event stream directly in the terminal, without launching the web service or hand-dispatching the dozens of event types that reply_stream produces. The console module ships two entries, one per usage scenario:

Launch an Interactive Chat

launch_console takes a constructed agent and handles the entire terminal interaction:
Chat with an agent in the terminal
Each part of the interaction behaves as follows: launch_console accepts the following parameters:
Agent
required
The agent to interact with.
str
default:"user"
The sender name attached to the user’s messages, also used as the input prompt.
str
default:"default"
Output verbosity, one of "quiet", "default", or "debug". See Control the Output Verbosity.
int | None
default:"20"
Maximum number of printed lines per tool result; the excess collapses into a hint line. None disables truncation.
launch_console involves no session management or persistence: the conversation lives in agent.state and ends with the process. For multi-user, multi-session, and persistent deployments, use the agent service.

Embed the Event Renderer

When you own the run logic yourself (an agent pipeline, a test script), use ConsoleRenderer for printing only. The renderer is passive: how events are produced, and how inputs and confirmations are handled, are entirely up to the caller.
Render the event stream in your own code
The renderer attributes events by reply id, so multiple agents speaking in sequence can share one instance:
Render a multi-agent pipeline
The renderer applies the following rules per content type:
For events that need a human in the loop (tool confirmation, external execution), the renderer only displays the notice; collecting the results and resuming the reply is the caller’s job. See Human-in-the-Loop.

Control the Output Verbosity

Both launch_console and ConsoleRenderer take a verbosity parameter with three increasing levels:
Unknown event types are skipped silently (debug prints one line with the type name), so new event types in the protocol never break existing rendering.