Glossary
Server-Sent Events (SSE)
Server-Sent Events (SSE) is a W3C web standard that lets a server push a continuous stream of text events to a browser client over a single long-lived HTTP connection, without the client needing to poll.
General definition
Server-Sent Events (SSE) establishes a unidirectional channel from server to client. The browser opens a standard HTTP GET request to an SSE endpoint, the server responds with Content-Type: text/event-stream and then streams newline-delimited event records indefinitely rather than closing the connection. The browser’s built-in EventSource API handles reconnection automatically if the connection drops.
- Natively supported in all modern browsers via the
EventSourceAPI (no library needed) - Unidirectional: server pushes to client only (client cannot send data over the same connection)
- Automatic reconnection with a configurable
retryinterval idfield allows the browser to resume from the last seen event after a reconnect- Works over plain HTTP/1.1 and HTTP/2; does not require a protocol upgrade handshake
SSE is an excellent fit for live feeds where the server generates updates and the client only needs to receive them: notification streams, activity feeds, AI model token streaming, live dashboards, and progress indicators. For bidirectional communication, WebSocket is a better fit because SSE has no client-to-server messaging over the same connection.
HTTP/2 removes the one active SSE connection per origin limit that existed in HTTP/1.1, making SSE practical at higher scale. For cases requiring bidirectional communication or binary data, WebSocket remains the standard. For one-way streaming of text events, SSE is simpler to implement and deploy because it uses plain HTTP with no protocol upgrade.
In the Ethora ecosystem
SSE is the transport underlying AI token streaming in the AI SDK: when a user sends a message to an AI agent and the model begins generating a response, the tokens are streamed back to the client as SSE events, giving the “typing” appearance that users expect from modern AI chat interfaces. This avoids waiting for the full response before rendering anything.
For the persistent bidirectional messaging channel in the Chat SDK, Ethora uses WebSocket over XMPP rather than SSE, because chat requires both sending and receiving over the same connection. Understanding which transport fits which use case helps teams choose the right integration path when building on Ethora’s APIs.