Durable Objects
Durable Objects
Named, persistent key-value entities with real-time subscriptions.
What it is
A Durable Object is a shared, persistent key-value entity that:
- is addressable from your server SDK or over HTTP from any language
- serialises concurrent writes automatically — no conflicts
- streams every change to real-time subscribers
- lets processes reconnect and replay what they missed via
after_log_id
No framework to learn. No classes to extend. No handlers to register.
Writes come from your server (SDK or HTTP). Browsers subscribe read-only
with pingerchips.object(type, key) — see the
Client SDK.
Mental model
Loading diagram…
State = materialised view of current slot values (fast reads). Log = source of truth (replayed on restart — no data loss possible).
Addressing
Objects are identified by type and key — arbitrary strings, no registration needed:
type: "order" key: "order-42"
type: "run" key: "run-abc123"
type: "session" key: "user-99"When to use
| Use case | Why |
|---|---|
| AI agent run state | Agents write progress; clients see it live |
| Shared working memory | Multiple agents, one serialised object |
| Approval queues | Status changes broadcast in real time |
| Atomic counters | increment is always serialised |
| Append-only event logs | append builds an ordered audit trail |
Chat / Sessions is built directly on Durable Objects — each thread is an object of type "thread".
New here? Start with the Quickstart.
Know what you're looking for? Jump to Concepts or the Server SDK.