Durable Streams
Persistent, addressable, real-time HTTP-based data streams for building resilient agent sessions and collaborative multi-user, multi-agent AI systems.
At a Glance
About Durable Streams
Durable Streams is an open-source data primitive for the agent loop, providing persistent, addressable, real-time streams over HTTP. It enables resilient AI agent sessions, collaborative multi-user systems, and reliable client-side data delivery with offset-based resumability and exactly-once message delivery. Built on 1.5 years of production use at Electric for real-time Postgres sync, it reliably handles millions of state changes daily. The protocol is content-type agnostic, CDN-friendly, and works across web browsers, mobile apps, native clients, IoT devices, and edge workers.
- Offset-based resumability — clients resume from any point after disconnection, page refresh, or tab switch without losing data
- Real-time tailing — supports long-poll and SSE modes for live streaming with catch-up from any offset
- AI conversation streaming — stream LLM token responses with resume capability across reconnections using the Durable Proxy
- Agentic app support — stream tool outputs and progress events with replay and clean reconnect semantics
- Multi-client SDKs — official client libraries for TypeScript, Python, Go, Elixir, C#/.NET, Swift, PHP, Java, Rust, and Ruby
- CLI tooling — create, read, append to, and tail streams from the command line
- StreamDB & StreamFS — higher-level abstractions including a type-safe reactive database and a filesystem with real-time sync built on streams
- Durable State — sync structured state using insert/update/delete operations over streams
- TanStack AI & Vercel AI SDK integrations — drop-in transport layer for popular AI frameworks
- CDN-native scaling — HTTP-native design enables massive fan-out to millions of concurrent viewers from a single origin
- Production Caddy plugin — deploy a production-grade server using the official Caddy plugin
- MIT licensed — free to use, modify, and distribute; self-host with the Node.js reference server or Caddy plugin
Community Discussions
Be the first to start a conversation about Durable Streams
Share your experience with Durable Streams, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Free to use, modify, and distribute under the MIT License. Self-host with the Node.js reference server or Caddy plugin.
- Full protocol implementation
- Node.js reference server
- Caddy production server plugin
- CLI tooling
- Multi-language client SDKs (TypeScript, Python, Go, Elixir, C#/.NET, Swift, PHP, Java, Rust, Ruby)
Capabilities
Key Features
- Offset-based resumable streams
- Long-poll and SSE real-time tailing
- Exactly-once message delivery
- AI conversation/token streaming
- Durable Proxy for AI token streams
- Durable State (insert/update/delete over streams)
- StreamDB (type-safe reactive database)
- StreamFS (filesystem with real-time sync)
- Multi-language client SDKs
- CLI tooling
- Caddy server plugin
- Node.js reference server
- CDN-friendly HTTP-native design
- Content-type agnostic byte streams
- Server conformance and client conformance test suites
- Performance benchmarking suite
