AgentListener
A concrete orchestration class that manages the logging lifecycle, wrapping an AgentLogger and manages the concurrent listening task whilst piping events into the logger.
listen- Starts the async task that receives chunksclose- Cancels the listening task
set_default_agent_listener
A function that can be used to set the global default AgentListener for your runtime.
The listener constructor for logging an agent or agentic function’s activity and chat history.
If
None, no listener will be used.If
True, the listener only applies for this context.