Skip to main content
After running an agent, you can access the complete execution context via AgentRunOutput. This provides the final output, tool executions, usage statistics, and more.

Using return_output Flag

The simplest way to get the full AgentRunOutput is using return_output=True:

Async Version

Using get_run_output() Method

Alternatively, access the last run’s output via agent.get_run_output():

Key Properties

Status Checking

Accessing Usage Statistics

Accessing Tool Executions

Accessing Messages

Serialization

AgentRunOutput supports full serialization for persistence:

Streaming with Output Access

After streaming completes, access the final output:

HITL (Human-in-the-Loop) Requirements

For external tool execution: