Stream responses in real-time changedagent-sdk/streaming-output
Nearest release: v2.1.326, published 3 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 16 Nov 2026 21:51 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 16 Nov 2026 22:07 UTC.
Upstream edited
Recorded here
Lines+6added
Lines−3removed
From line
4
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits12to this page, all time
The whole hunk
from line 4, old and new numbered
/
from line 4
44
55By default, the Agent SDK yields a complete `AssistantMessage` for each non-empty content block, such as a text block or a tool call, after Claude finishes generating that block. To receive incremental updates as text and tool calls are generated, enable partial message streaming.
66
7> [!TIP]
7> [!NOTE]
88>
9> This page covers output streaming (receiving tokens in real-time). For input modes (how you send messages), see [Send messages to agents](https://code.claude.com/docs/en/agent-sdk/streaming-vs-single-mode.md). You can also [stream responses using the Agent SDK via the CLI](https://code.claude.com/docs/en/headless.md).
9> These cases are covered on other pages:
10>
11> * **Sending messages to a running session**: see [Send messages to a running agent](https://code.claude.com/docs/en/agent-sdk/streaming-vs-single-mode.md)
12> * **Streaming responses from the CLI**: see [stream responses using the Agent SDK via the CLI](https://code.claude.com/docs/en/headless.md)
1013
1114## Enable streaming output
1215
from line 326
323326
324327Now that you can stream text and tool calls in real-time, explore these related topics:
325328
326* [Interactive vs one-shot queries](https://code.claude.com/docs/en/agent-sdk/streaming-vs-single-mode.md): choose between input modes for your use case
329* [Send messages to a running agent](https://code.claude.com/docs/en/agent-sdk/streaming-vs-single-mode.md): interrupt Claude's response or attach an image to a message
327330* [Structured outputs](https://code.claude.com/docs/en/agent-sdk/structured-outputs.md): get typed JSON responses from the agent
328331* [Permissions](https://code.claude.com/docs/en/agent-sdk/permissions.md): control which tools the agent can use
329332
No line in this hunk matches that.