Idle cost $0: Cloudflare's Project Think reinvents long-running AI agents!
Hey everyone, it's Shii-chan! Today I found an announcement that could change how we build AI agents from the ground up. Let's read it together!
Cloudflare Blog
What was announced?
The Cloudflare Blog announced "Project Think", the next generation of the Agents SDK for building AI agents that keep running for a long time.
Until now an agent was something you nudged along on your laptop, but Project Think moves that onto Cloudflare as infrastructure that stays alive. And even if you hand out "one agent per customer", the idle cost is $0. It builds on the story from the Agents Week post.
The story so far
To keep an AI agent running for a long time, you used to leave a VM or container up all the time, paying even while nothing happened.
Project Think is built on Durable Objects, so it hibernates while idle and you only pay when it wakes up to work. The post shares an example: for 10,000 agents each active 1% of the time, Durable Objects needs about 100 active instances, while always-on containers would need all 10,000 running. That is a big difference!
What changes
The biggest wins: an agent can recover from a crash and continue, spawn child agents, remember a whole conversation, and run code safely by itself.
Cloudflare's infrastructure takes over the foundation you used to build by hand, so you can focus on what you want the agent to actually do.
Dive Deep
Here is how the concrete pieces from the post fit together, in my own words.
Fibers (durable execution): work started with runFiber() is registered in SQLite, and if it crashes midway it can resume via onFiberRecovered. Long operations persist a job ID and hibernate while they wait. See the durable execution API reference.
Sub-agents (Facets): a parent agent can spawn child agents, each with its own isolated SQLite. Parent and child talk over typed RPC and are colocated for low latency. This is powered by Facets.
Persistent sessions (Session API): messages form a tree linked by parent_id, so forking a conversation never loses the original path. You get full-text search via SQLite FTS5, plus non-destructive compaction that summarizes history instead of deleting it.
Sandboxed code execution: code written by the LLM runs safely in an isolated environment. It executes on Dynamic Workers that spin up in milliseconds, using @cloudflare/codemode. Only explicitly granted permissions apply, thanks to a capability model.
The execution environment is also a five-rung ladder:
- Tier 0 Workspace: a virtual filesystem backed by SQLite and R2
- Tier 1 Dynamic Worker: sandboxed JavaScript
- Tier 2 npm runtime: dependencies resolved with esbuild
- Tier 3 Headless browser: page automation via Browser Run
- Tier 4 Sandbox: a full OS with git, compilers, and test runners
An agent climbs only as high as it needs, so nothing is wasted.
Think base class: an opinionated base that handles the agentic loop, streaming, message persistence, tool execution, and error handling for you. Override getModel(), getSystemPrompt(), getTools(), maxSteps, and configureSession() and you have your own agent. Persistent memory keeps parts of the system prompt as "context blocks" that survive hibernation.
Here is how you start:
npm install @cloudflare/think agents ai @cloudflare/shell zod workers-ai-provider
You call models through Workers AI; the post uses @cf/moonshotai/kimi-k2.5 as an example. Model access can also go through AI Gateway. If you want more, the documentation is public too.
One note: Project Think is in experimental preview. The API surface is mostly settled but will keep evolving, and it already powers Cloudflare's internal agent infrastructure.
Wrap-up
- Cloudflare announced Project Think, the next-generation Agents SDK
- Built on Durable Objects: $0 while idle, pay only when it wakes
- Durable execution (Fibers), sub-agents (Facets), persistent sessions, and sandboxed execution are all included
- A five-rung execution ladder, from a filesystem to a full OS
- Extend the Think class and the tricky foundation is handled for you
I think this lands hardest with serverless-loving engineers who really want to build long-running agents!