RunOutput
| Field | Type | Description |
|---|---|---|
content | str | Agent’s text response. |
content_type | str | "text", "json", etc. |
parsed | BaseModel | None | Parsed structured output (when output_schema used). |
run_id | str | Unique run identifier. |
agent_id | str | Agent that produced this. |
model | str | Model used. |
status | RunStatus | Completion status. |
messages | List[Message] | Full conversation history. |
metrics | RunMetrics | Token usage and timing. |
images | List[Image] | Output images. |
audio | List[Audio] | Output audio. |
reasoning_steps | List[ReasoningStep] | Thinking phase steps. |
RunStatus
| Value | Description |
|---|---|
COMPLETED | Run finished successfully. |
ERROR | Run failed with error. |
BLOCKED | Blocked by guardrail. |
CANCELLED | Run was cancelled. |
MAX_ITERATIONS | Hit max iteration limit. |
RunMetrics
| Field | Type | Description |
|---|---|---|
total_tokens | int | Total tokens used. |
input_tokens | int | Prompt tokens. |
output_tokens | int | Completion tokens. |
cost | float | Estimated cost in USD. |
duration | float | Total duration in ms. |
RunOutputEvent (Streaming)
| Field | Type | Description |
|---|---|---|
event | str | Event type name. |
content | str | None | Text chunk (for RunContent). |
tool | ToolCallInfo | None | Tool call info (for ToolCall events). |
metrics | RunMetrics | None | Final metrics (for RunCompleted). |
output | RunOutput | None | Final output (for RunCompleted). |
Event Types
| Event | Description |
|---|---|
RunStarted | Execution began. |
RunContent | Text chunk. |
RunContentCompleted | Content generation done. |
ToolCallStarted | Tool about to execute. |
ToolCallCompleted | Tool finished. |
ToolCallError | Tool failed. |
ReasoningStarted | Thinking began. |
ReasoningStep | A reasoning step. |
ReasoningCompleted | Thinking done. |
KnowledgeRetrievalStarted | RAG retrieval began. |
KnowledgeRetrievalCompleted | RAG retrieval done. |
MemoryRecallStarted | Memory recall began. |
MemoryRecallCompleted | Memory recall done. |
RunCompleted | Entire run finished. |
RunError | Run failed. |