Visualize agent reasoning and tool calls as collapsible, nested steps in the chat interface.
Steps can be nested to show hierarchical reasoning:
Common step patterns:
Steps appear in the chat as collapsible panels showing:
Parameters:
name
type
"tool_call"
"reasoning"
"sub_agent"
"retrieval"
"custom"
parent
metadata
Methods:
async stream_token(token)
async with step: ...
Decorator Parameters:
**metadata
Usage:
Steps emit these RunEventType events:
RunEventType
REASONING_STARTED
step_type
parent_id
REASONING_STEP
REASONING_COMPLETED
duration
error