Realtime infrastructure for AI.
Voice agents, multi-agent chat, copilots, agent dashboards. starcite gives you one ordered stream with session replay, reconnect, and persistence built in.
Everyone who builds with AI usually hits failure cases in the session layer.
“I built this myself too many times. Duct-taped Redis, Postgres, and SSE together and still ended up with constant pain. After watching three other teams do the exact same thing, I got pissed and figured we can do better”— Sebastian Lund, Founder
In-region, HTTPS, auth + 3x replication. Open source · Apache 2.0. See our Next.js example.
One session, many writers, many readers. Agents, tools, and users append into one ordered timeline. Every consumer sees the same events in the same order. Multi-agent pipelines, handoffs, tool chains: one timeline.
Built for volume. Agent sessions aren't chat. Thinking steps, tool calls, status updates, checkpoints. Hundreds of events per second per session.
Resume by cursor, follow live. Refresh, tab switch, reconnect, device handoff. Readers reattach from their last cursor without rebuilding session state. Archive to your storage backend on your retention policy.
Framework agnostic. Append on the backend, bind a session token on the frontend. Works with next.js, vercel ai sdk, langchain, or your own thing.
Stop rebuilding session infrastructure.
Open source, Apache 2.0. Deploy it yourself or talk to us about a managed setup.
FAQ
How does starcite fit into my existing stack?
starcite sits under your orchestrator and transport as the session stream. Call append() where your agents emit events, then bind the UI with session.on("event") and session.on("error"). The SDK handles replay, reconnect, and cursor tracking.
How is this different from SSE or WebSockets?
SSE and WebSockets move bytes. starcite gives you one ordered session stream across agents, tools, and UI. In app code, subscribe with session.on("event"); the SDK replays retained history, continues live, and surfaces fatal stream issues through session.on("error").
Why do messages disappear or duplicate after refresh, tab switching, or reconnect?
When the connection drops, naive streams replay from the wrong spot and users see gaps or duplicates. Starcite keeps one ordered session stream underneath the UI, so replay and live updates stay on the same path. For the full technical breakdown, see Why Agent UIs Lose Messages on Refresh.
How do I resume SSE/EventSource after reconnect?
Treat EventSource auto-reconnect as a transport hint, not your resume layer. Persist the last Starcite cursor you rendered, or let the browser SDK do it with a session store. Your UI still stays on session.on("event") and session.on("error"), while the underlying session stream handles catch-up. For a deeper dive, read the six failure modes post.
Should I use Redis Streams or Kafka, or build my own event broker?
Redis Streams and Kafka can work if you already run them, but you still own replay, reconnect, and frontend reliability edge cases. Starcite gives you the ordered session stream and cursor-based catch-up without bespoke stream glue.
Can multiple clients observe the same session?
Any number of clients can observe the same session. A browser, a second tab, a mobile device, a monitoring dashboard, a webhook consumer. Each reader owns its own cursor and sees the same ordered timeline.
How is starcite persistence implemented?
Starcite keeps the live session stream ordered and replayable. A background archiver flushes committed events to S3 or Postgres. The hot path stays fast, while your storage backend owns durable history.
How does ordering work with multiple agents?
Every event gets a monotonic sequence number on write, so every consumer sees the same total order. Progress, tool calls, handoffs, and answers stay in one coherent timeline.
What's the difference between replay and resume?
They are the same underlying session-stream operation. SDK subscribers replay retained history first and then continue live; raw API consumers resume by reconnecting from a cursor.
What can I store in a session?
Any typed message: user messages, assistant responses, tool calls, tool results, status updates, thinking steps, agent handoffs, checkpoints, artifacts. starcite is schema-flexible. You define the types that matter to your product.
Is starcite an agent framework?
No. starcite does not route, plan, or execute agents. It gives your product a reliable session timeline for the events your agents produce. Your orchestrator stays yours.
Is this open source?
Yes. You can view the source at github.com/fastpaca/starcite.