> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Working with results and items

> Build Python run timelines from messages, steps, tools, and streamed items.

`AgentRunResult` contains durable run state, messages, steps, usage and cost, warnings, finish reasons, and final output.

Use `text_stream()` for answer text and `item_stream()` for provider and runtime items. Python item values are dictionary-shaped rather than the TypeScript discriminated `AgentItem` union.

```python theme={null}
for item in stream.item_stream():
    item_type = item.get("type")
    render_timeline_item(item_type, item)
```

Keep provider-specific dictionary access behind one application adapter, then persist the completed result for later reconstruction.

## Related

* [Streaming](./agent-sdk-streaming)
* [Lifecycle hooks](./agent-sdk-lifecycle-hooks)
