AgentLogger
A pluggable base class that powers listeners by defining the logging behaviour itself.
on_spawn- Called when an agent is spawnedon_call_enter- Called when an agent receives a prompton_call_exit- Called when an agent returns a resulton_chunk- Called when a streaming chunk is received
Chunk
A single piece of streamed content from an agent invocation.
type field lets consumers distinguish different kinds of streamed content:
| Type | Description |
|---|---|
'reasoning' | Internal reasoning / chain-of-thought |
'output_text' | Final output text |
'code' | Code being executed in the REPL |
'usage' | Token usage statistics |
'invocation_exit' | Signals the end of an invocation |
None | Untyped chunk |