> ## 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.

# Streaming

> Stream Python agent text, reasoning, items, tools, and lifecycle events.

`Agent.stream(...)` runs the same state machine as `run(...)` and returns a replayable `AgentStreamResult`:

```python theme={null}
stream = agent.stream(input="Research this topic", client=client)

for delta in stream.text_stream():
    print(delta, end="", flush=True)

completed = stream.result()
```

Use `reasoning_stream()`, `item_stream()`, `tool_stream()`, or `full_stream()` for other projections. Python items are currently dictionary-shaped rather than a native discriminated union.

Call `cancel()` to stop the active model stream and pass cancellation into local runtime work.

## Related

* [Tools](./agent-sdk-tools)
* [Observability and DevTools](./agent-sdk-observability)
