Server-Sent Events
Server-Sent Events (SSE) is a standard HTTP-based protocol for server-to-client streaming, where the server pushes events over a long-lived HTTP connection. SSE is simpler than WebSockets — it uses standard HTTP, works through proxies and load balancers without special configuration, and automatically reconnects on disconnection. In AI applications, SSE is commonly used to stream LLM token generation to the client. While it only supports server-to-client communication (unlike WebSocket's bidirectional flow), this is sufficient for most LLM streaming use cases. Many LLM APIs (OpenAI, Anthropic) use SSE as their streaming format.
Related Terms
WebSocket Streaming
InfrastructureWebSocket streaming uses the WebSocket protocol to establish a persistent, full-duplex communication channel between the client and server, enabling real-time bidirectional data flow.
FastAPI
Frameworks & ToolsFastAPI is a modern, high-performance Python web framework for building APIs, built on top of Starlette (for async HTTP) and Pydantic (for data validation).
API Gateway
InfrastructureAn API gateway is a reverse proxy that sits between clients and backend services, providing a single entry point for API requests.
Ready to build your first production AI agent?
Open-source tools, battle-tested patterns, zero boilerplate. Configure your stack and ship in minutes — not months.