CH 08 · Streaming and Real-Time UX · 01/11
Read as one pageStreaming and Real-Time UX
Streaming shapes an agent's transport, orchestrator, and data model, not just its interface. Covers SSE versus WebSockets and backpressure.
11 slides · 5 min read
In this chapter
- 01Why streaming is architectural
- 02The transport: SSE vs WebSockets
- 03The event-timeline pattern
- 04Streaming text while hiding machine protocol
- 05Ordering: flush before you act
- 06Surfacing reasoning
- 07Persisting the stream for replay
- 08Handling failures mid-stream
- 09Backpressure and connection management
- 10The payoff
Agents are slow by the standards of web requests; a single turn can take many seconds, involving several model calls and tool executions. If the user stares at a spinner the whole time, the agent feels broken even when it's working perfectly. Streaming is the answer, and it's not a cosmetic add-on: it's an architectural choice that shapes your orchestrator, your transport, and your data model. This chapter explains how to design a streaming agent.
Finished this idea?
Your learning progress stays in this browser.