Most agent frameworks treat persistence as something you bolt on afterward — a Redis instance for memory, a separate session store, a queue for long jobs. Cloudflare Agents collapses all of that into one primitive: the agent is a Durable Object. Compute, storage, and identity live in the same place, so an agent can sleep for days, wake on a single request, and resume exactly where it left off without rehydrating state from anywhere else.
What Sets It Apart
- State and compute are co-located. Each agent owns embedded SQLite storage that survives restarts and syncs to connected clients automatically — no external database round-trips on the hot path.
- Hibernation is the default, not an optimization. Idle agents cost nothing and evict from memory; an incoming WebSocket message or RPC call revives them, making "one long-lived agent per user, session, or document" economically viable at scale.
- Resumable LLM streaming survives disconnects. Because the agent holds the stream's state, a client that drops mid-generation can reconnect and keep reading — a hard problem in stateless serverless setups.
- MCP works both ways. An agent can act as an MCP server exposing its tools or as a client consuming external ones, and it can speak WebSocket, HTTP, email, and voice (STT/TTS) from the same object.
Who It's For
Great fit if you already build on Cloudflare Workers and want stateful, per-entity agents — chat assistants, document collaborators, long-running workflow runners — without standing up your own state layer. The Durable Object model hands you strong single-threaded consistency per agent for free.
Look elsewhere if you need to run on your own hardware or another cloud: the framework is tightly coupled to Durable Objects and Workers, so it isn't portable. Likewise, if your agent is a one-shot stateless call, the persistence machinery is overhead you won't use.