Skip to content

Streaming and typing indicators

The web widget uses Server-Sent Events (SSE) to stream assistant replies token-by-token and show typing indicators while the model and tools work.

PhaseUI
Message sentTyping indicator appears
Model streamingText renders incrementally
Tool runningStatus notifications may show progress text
Tool success + transformRich content cards append after or alongside text
CompleteTyping indicator clears

SSE keeps a single long-lived connection for the turn — lower latency and smoother UX than polling. Direct API clients can also consume stream endpoints; see SSE events.

ExecutionStream behavior
sync toolStream may pause until tool returns, then continue
async toolStatus lines first; final answer streams when ready

Configure execution mode per tool for long-running APIs.

Structured cards arrive as dedicated stream events after successful tool JSON is transformed — not mixed into markdown the model invents. Trust policy.

  1. Create widget deployment on staging.
  2. Ask a question that triggers streaming only, then one that triggers a tool.
  3. Confirm typing indicator and card timing feel acceptable on mobile networks.