Cloudflare rolled out Project Think this week, the next iteration of its Agents SDK, targeting a “boring but deadly” problem in AI agent deployment: traditional container architectures burn money on idle instances. For 10,000 agents, each active only 1% of the time, container-style deployment requires 10,000 persistent instances. Project Think’s Durable Objects architecture needs roughly 100 concurrently active instances. Already powering “thousands” of agents in production, the upgrade introduces six new primitives that address not cognitive capability but persistence, security, and infrastructure cost.
Six New Primitives: From Durable Execution to Self-Authored Extensions
Durable Execution via Fibers: Stateless functions lose progress on crash. Fibers write state to SQLite before execution via runFiber(), allowing agents to save state with stash() and resume from onFiberRecovered. This is essential for long-running research agents that may run for hours.
Sub-agents: Deployed as co-located Durable Objects with independent SQLite databases and execution environments. They communicate with parent agents via Facets, with TypeScript compile-time error detection rather than runtime crashes.
Persistent Sessions: Each message carries parent_id to form a tree structure, supporting fork for exploration without breaking original paths, non-destructive compaction summarizing old messages, and built-in FTS5 full-text search. This solves the “forgetfulness” of AI assistants after multi-turn dialogues.
Sandboxed Code Execution: Dynamic Workers based on V8 isolate start in milliseconds, 100x faster than containers with 100x memory efficiency. Authorization is explicit: default globalOutbound is null; developers must grant access to each resource.
The Execution Ladder: Five tiers from lightest to heaviest—Tier 0 SQLite + R2 virtual filesystem (data only), Tier 1 sandbox JS, Tier 2 adds npm resolution and esbuild bundling, Tier 3 Headless Browser, Tier 4 full Cloudflare Sandbox (supports git clone, npm test, cargo build). Agents choose the appropriate tier based on task complexity rather than defaulting to the heaviest tool.
Self-authored Extensions: Agents can write TypeScript extensions at runtime, packaged into Dynamic Workers by the ExtensionManager. Once created, extensions persist permanently—no fine-tuning, no RLHF needed. Tool knowledge lives in infrastructure, not in the model.
Think Base Class: Unified Lifecycle
The Think base class encapsulates the full lifecycle of a chat agent: loop, persistence, streaming, tool execution, and resumption after interruption. Subclassing requires as few as 5 lines of code. Built-in features include chunk-based memory, tree-structured sessions, FTS5 search, and non-destructive compaction. The design removes boilerplate from developers and lets infrastructure handle state management complexity.
Three Waves Thesis: Agents as Infrastructure
Cloudflare’s documentation outlines three waves of AI agent evolution: first, stateless chatbots; second, tool-equipped code agents confined to local laptops (e.g., Claude Code, Codex); third, “agents as infrastructure”—persistent, serverless, with zero idle cost and structural security isolation. Project Think is a bet on the third wave. The argument: move tools like Claude Code from laptops to the cloud, let them self-recover after crashes, and bill for actual usage rather than peak concurrency. Cloudflare’s own AI Gateway and Workers AI are part of this ecosystem—Project Think’s success is also a traffic and revenue driver for the platform.

