Why does streaming matter?
Multi-step agents often take several seconds to call tools and draft a detailed response. Streaming cuts perceived latency dramatically and gives users transparent feedback while the agent works or pauses for sign-off.
Language models produce text word by word. Streaming passes those pieces to your app as they arrive, usually over server-sent events, so users see the reply forming instead of waiting for the whole answer.
Agent streams also carry events, such as a tool call starting or an approval being needed.
Key characteristics of streaming
- Delivers incremental text deltas as soon as the model generates the first tokens.
- Emits structured lifecycle events for tool calls, progress updates, errors, and approval requests.
- Uses standard HTTP Server-Sent Events (SSE) so backend proxies and web UIs can consume streams easily.
- Improves perceived responsiveness without changing total model generation time.
How streaming works step by step
- 1. Tool statusShow live lookup progress in UI
- 2. Text deltasRender words as they arrive
- 3. Approval eventSurface approve/deny controls inline
- 4. CompletionFinalize message and persist turn
Streaming vs. buffered responses
| Dimension | Streaming (SSE) | Buffered JSON response |
|---|---|---|
| Time to first feedback | Sub-second text or status events | Waits until every tool and token finishes |
| Tool & approval visibility | Emits live tool and approval events | Only visible after full run completes |
| Best fit | Interactive chat and in-product UIs | Background webhooks and scheduled batch jobs |
| Client handling | Reads event stream incrementally | Single standard JSON parse |
Example in practice
How Norilu handles streaming
Frequently asked questions
- When should I use a buffered response instead of streaming?
- Use buffered responses for background webhooks, scheduled jobs, or server-to-server pipelines where no human is watching the reply form in real time.
- What events belong in an agent stream besides text chunks?
- Well-structured agent streams include text deltas, tool execution notices, approval-required events, completion summaries, and structured error events.