Skip to main content
For new applications, we recommend event streaming—the typed-projection API introduced in Deep Agents v0.6. Event streaming gives you separate iterators per projection (subagents, messages, tool calls, values) so you can consume them independently instead of branching on stream_mode chunks.
Deep Agents build on LangGraph’s streaming infrastructure with first-class support for subagent streams. When a deep agent delegates work to subagents, you can stream updates from each subagent independently—tracking progress, LLM tokens, and tool calls in real time. What’s possible with deep agent streaming:

Enable subgraph streaming

Deep Agents use LangGraph’s subgraph streaming to surface events from subagent execution. To receive subagent events, enable stream_subgraphs when streaming.

Namespaces

When subgraphs is enabled, each streaming event includes a namespace that identifies which agent produced it. The namespace is a path of node names and task IDs that represents the agent hierarchy. Use namespaces to route events to the correct UI component:

Subagent progress

Use stream_mode="updates" to track subagent progress as each step completes. This is useful for showing which subagents are active and what work they’ve completed.
Output

LLM tokens

Use stream_mode="messages" to stream individual tokens from both the main agent and subagents. Each message event includes metadata that identifies the source agent.

Tool calls

When subagents use tools, you can stream tool call events to display what each subagent is doing. Tool call chunks appear in the messages stream mode.

Custom updates

Use get_stream_writer inside your subagent tools to emit custom progress events:
Output

Stream multiple modes

Combine multiple stream modes to get a complete picture of agent execution:

Common patterns

Track subagent lifecycle

Monitor when subagents start, run, and complete:

v2 streaming format

Requires LangGraph >= 1.1.
All examples on this page use the v2 streaming format (version="v2"), which is the recommended approach. Every chunk is a StreamPart dict with type, ns, and data keys — the same shape regardless of stream mode, number of modes, or subgraph settings. The v2 format eliminates nested tuple unpacking, making it straightforward to handle subgraph streaming in Deep Agents. Compare the two formats:
See the LangGraph streaming docs for more details on the v2 format, including type narrowing and Pydantic/dataclass coercion.