Skip to main content
Every agent execution produces structured output. Non-streaming runs return a RunOutput object; streaming runs yield a sequence of RunOutputEvent objects.

RunOutput

The RunOutput dataclass contains everything from a completed run:

Content

Identity

Execution

Media

Control

RunStatus

Stream Events

Streaming runs yield typed events. Each event has an event field identifying its type.

Lifecycle Events

Content Events

Tool Events

Reasoning Events

When thinking is enabled (Agent(thinking=True)), the agent emits reasoning events before the main response:

Complete Event Reference

Getting Metrics from a Stream

The RunCompleted event carries the full run metrics and content directly on the event object: