Server-Sent Events (SSE)
Server-Sent Events (SSE) is a one-way streaming protocol over HTTP that pushes text events from a server to a browser as they occur.
In plain English
SSE is the simplest way to stream from a server to a browser. The client opens an HTTP connection to an endpoint that declares Content-Type: text/event-stream, and the server writes events separated by blank lines. The browser's EventSource API parses the stream and fires onmessage handlers. No websocket handshake, no protocol upgrade — just plain HTTP that stays open.
Compared with WebSockets, SSE is one-way (server → client) but easier to use: it survives proxies, works over HTTP/2 multiplexing, auto-reconnects on drop, and requires no special server framework. For streaming model output, tool events, and agent activity — all inherently server-to-browser — SSE is usually the right choice.
Why it matters for Black Box
The Action Feed streams over SSE. The engine emits NDJSON events; the API server exposes them on GET /v1/events; the browser listens with EventSource. Every specialist's tool call, every agent step, every evaluator verdict arrives in the UI within milliseconds.
Examples
- Streaming an LLM's token-by-token output to the browser.
- Broadcasting agent step events to the Action Feed.
- Pushing build-log lines from a deploy job to the UI.