Durable Objects are Made for Agents
calv.info
Cloudflare's Durable Objects turn out to be a near-perfect fit for building AI agents. Barely anyone's heard of them, but they're cheap and surprisingly fast to build with.
Based on reporting by calv.info — read the original for the full story.
Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error
A developer who's spent the last few months building almost exclusively on Cloudflare Durable Objects (DOs) is making the case that they're an underrated primitive, especially for agents. Most people, they note, haven't even heard of DOs. That's a shame, because the fit for agent workloads is unusually clean. The writer discloses being long a small amount of NET stock and bullish on Cloudflare, so take the enthusiasm with that context in mind.
Under the hood, a DO is a serverless V8 isolate that spins up and down on demand, running JS or WASM code with a subset of Node APIs available. Each instance is keyed by ID, similar to how Lambda invocations work but with persistent context tied to that ID. Paired with each DO is its own SQLite instance for durable storage, and Cloudflare handles the routing of requests to the right isolate automatically. Instead of a pile of services talking to a shared database, you end up thinking in terms of many small stateful objects, each triggered by requests or by timers called alarms. A chat room, for instance, can be built as a single DO class handling its own websocket connections and broadcasting messages to everyone in that room.
The practical upsides pile up fast. Local development runs through wrangler, a CLI that doubles as a dev environment, and because production also runs SQLite, there's little drift between local testing and what ships. DOs are strictly single-threaded, so only one invocation touches storage at a time, cutting down on locking headaches. Native websocket support makes fan-out for things like notification feeds far simpler than building a multi-tiered system. Bindings to other DOs, services, or R2 storage are just configuration in a wrangler.jsonc file, no VPCs or security groups required. And the economics are striking: a decently sized multi-agent workload reportedly ran around $10 a month, versus something like 10 to 50 times that on AWS. Preview environments are nearly free too, since idle DOs cost almost nothing, making it practical to spin up a fresh one per branch in CI.
But it's not all smooth. DOs use a gating system for reads and writes, and if a function samples from an LLM before writing to storage, it can hang every subscriber waiting on that object — the writer hit cases where read requests blocked for tens of seconds at a stretch. There were also reliability headaches around misconfigured gateways to LLM APIs and difficulty deploying through Cloudflare's own APIs, paired with a sense of less visibility and control than AWS, GCP, or Azure typically offer. Tooling is TypeScript-first, so Rust, Go, or Python developers get fewer examples and options. Missing pieces of the Node API can also bite, HTTP/2 isn't supported, which breaks things like gRPC calls to Modal's APIs. Schema migrations are handled by code that runs when a DO wakes up, which works but makes it easy to lose track of the current schema state, and old migration paths can't really be retired unless every single DO has woken at least once. And for companies wanting to bring their own cloud, especially anyone with sensitive data, Cloudflare's model is a non-starter.
On the competitive landscape, the writer sees a few early alternatives worth watching. Restate offers a cheaper, faster take on durable execution akin to Temporal, built by former Flink engineers, with 'Virtual Objects' that mirror much of what a DO offers and support for self-hosting plus other languages like Rust and Go. Rivet, a newer YC-backed company, is building similar 'actor' infrastructure leaning on V8 isolates. And Vercel's growing toolkit, spanning Workflows, Sandboxes, AI Gateway, and Functions, is described as another serious contender for stitching together long-lived agent infrastructure, with a project called EVE cited as pulling those pieces together.
My take — AI-written commentary, not fact-checked reporting
Cheap, scale-to-zero compute that's basically built for one agent per object is exactly the kind of infrastructure the current agent boom actually needs, and it's telling that almost nobody outside a niche of builders seems to know it exists. The gaps are real and not small: no bring-your-own-cloud option and TypeScript-only tooling will keep a lot of enterprise buyers away, which is a strange blind spot for something this well-suited to production agent work. Betting on infrastructure with essentially no direct competitor, while everyone else chases the same handful of orchestration frameworks, looks like the smarter long game.
Read more about this at: calv.info