Skip to content

Unbroken Protocol

Simple, resumable HTTP streaming for modern applications

What is Unbroken Protocol?

Unbroken Protocol provides a simple, web-native primitive for applications requiring ordered, replayable data streams with support for catch-up reads and live tailing. It’s designed as a foundation for:

  • AI conversation streaming and history
  • Database synchronization and change feeds
  • Event sourcing architectures
  • Collaborative editing
  • Real-time application state updates

Key Features

Resumable

Clients can resume from any offset after disconnection

Durable

Data persists until explicitly deleted or expired

HTTP Native

Works with CDNs, proxies, and standard infrastructure

Simple

Minimal API surface with standard HTTP semantics

Quick Example

Terminal window
# Create a stream
curl -X PUT http://localhost:9999/events \
-H "Content-Type: application/json"
# Append data
curl -X POST http://localhost:9999/events \
-H "Content-Type: application/json" \
-d '{"event": "user_signup", "user_id": 42}'
# Read data
curl "http://localhost:9999/events?offset=-1"
# Live tail with SSE
curl "http://localhost:9999/events?offset=-1&live=sse"

Protocol at a Glance

Operations

MethodPathDescription
PUT{stream}Create
POST{stream}Append
GET{stream}?offset=XRead
GET{stream}?offset=X&live=sseSSE stream
HEAD{stream}Metadata
DELETE{stream}Delete

Headers

HeaderDirectionDescription
Stream-Next-OffsetResponseNext offset for reads
Stream-Up-To-DateResponseAt end of stream
Stream-TTLRequestTime-to-live (create)
Stream-SeqRequestWriter sequence

Example Protocols

Unbroken Protocol serves as the foundation for building domain-specific streaming protocols:

File Streaming

Resumable file uploads/downloads with real-time watching

View Guide

Terminal Streaming

Shared terminal sessions with persistent output history

View Guide

Agent Streaming

AI agent sessions with tool use and message persistence

View Guide

Libraries

Default Port

Standalone servers use port 9999/tcp.

Inspired By

Unbroken Protocol builds on ideas from:

License

MIT License - See LICENSE for details.