Agentic AI Notebook
AG-UI & Agent UX
Phase 22Module 2 of 10

Agent Event Streaming

A twelve-second mute spinner feels broken even when the agent is working.

Airport boards. You want boarding group 3, not a blank screen.

Visual Workflows

Start here — scroll inside each diagram frame to explore, then use + / to zoom up to 200% if needed.

Overview

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

This turn

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

Airport boards. You want boarding group 3, not a blank screen.

Key Takeaways

  • 1.Stream tokens, tool spans, and status — do not wait for the final JSON.
  • 2.Users forgive latency they can see.
  • 3.Backpressure and cancel must be first-class.
  • 4.Event names matter more than SSE vs websocket.
  • 5.A twelve-second mute spinner feels broken even when the agent is working.

Real Example

Scenario

Airport boards. You want boarding group 3, not a blank screen.

What you would do

In AG-UI & Agent UX, apply Agent Event Streaming to this scenario: Airport boards. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.

Cheat Sheet

Quick recap

quick ref
  • Stream tokens, tool spans, and status — do not wait for the final JSON
  • Users forgive latency they can see
  • Backpressure and cancel must be first-class

Common Mistakes

  • Skipping evaluation for Agent Event Streaming before production
  • No logging or tracing around agent event streaming steps
  • Ignoring cost and latency implications