Why WebSockets beat SSE for AI streaming at scale
George B. — Senior Software Engineer
An interesting shift is happening in how we build AI products.
For the first wave of AI apps, streaming mostly meant one thing:
model → user
SSE (Server-Sent Events) was a natural fit. Simple, HTTP-native, and great for streaming tokens.
But agents are changing that interaction.
Now, while an agent is working, the user might need to approve a tool call, cancel an action, change direction, or provide additional context.
The stream becomes:
agent ↔ user
At that point, the transport isn’t just delivering tokens anymore. It’s carrying an interaction.
That’s a pretty good argument for why WebSockets may become much more common as AI products move from “generate something for me” to “do something with me.”
Good write-up from Ably:
https://ably.com/blog/websockets-beat-sse-ai-streaming

5 reactions · 0 comments