All posts
Designing the streaming API
Why SSE
Agent runs are one-directional streams of events until you intervene. Server-sent events keep that simple: one connection, typed events, automatic reconnect.
The settle phase
A run ends in one of three states: completed, interrupted, or failed. The final event carries the diff, the log location, and the token usage — so a client can persist exactly one receipt.
Share