What Is the Cloudflare Agents SDK?
Most agent frameworks solve the reasoning problem and leave the operational one to you. The model picks a tool, the framework calls it, and then your process exits and everything the agent knew disappears. Anything that needs to persist, wake up later, or survive a crash becomes your problem, usually solved with a database, a queue, and a cron job bolted on afterward.
Cloudflare’s Agents SDK starts from the opposite end. The reasoning is whatever model you point it at. What the SDK provides is the part that is tedious to build and easy to get wrong: durable identity, storage, scheduling, real-time connections, and recovery.
What the SDK gives you
A durable identity per agent. The core primitive is an Agent class, and each instance is addressable and persistent. The agent handling a customer’s request on Tuesday is the same agent, with the same accumulated context, that handled it on Monday. This is built on Durable Objects, which is the piece of Cloudflare’s platform this whole design leans on.
Local SQL storage. Each agent gets its own SQL database rather than sharing a table with every other agent and filtering by tenant ID. State lives next to the compute that uses it.
Scheduled work. An agent can schedule its own future execution, so “check back in six hours and follow up if nothing arrived” is a method call rather than an external cron entry pointed at an endpoint.
Recoverable execution. Cloudflare calls the mechanism fibers. A long-running agent workflow that fails partway through resumes rather than restarting, which is the difference between an agent that can run for days and one that can only run for seconds.
Real-time connections. WebSocket support is built in, so streaming an agent’s output to a UI does not require a separate service.
What it can do
The tool surface is broader than most SDKs ship with, largely because Cloudflare already had the underlying products:
- Browser automation, for agents that need to operate a web interface rather than call an API
- Sandboxed code execution, so an agent can run code it generated without running it in your runtime
- AI Search, for retrieval over your own content
- MCP tools, so an agent can call anything exposed through a Model Context Protocol server rather than only tools you wrote
- Payments, for agents that transact
- Code Mode, where the model orchestrates tools by writing code rather than emitting one structured tool call at a time
Communication channels cover chat, voice, email, Slack, and webhooks. The email channel is the most distinctive of these, because an agent implements an onEmail hook and receives parsed messages directly, with durable state making multi-message threads work without you building session tracking.
What it costs
There is no separate SDK price. It runs on Workers, so the bill is Workers plus whatever the agent consumes: Durable Objects for state, model tokens for inference, and per-product charges for anything else it calls. The Workers Paid plan starts at $5 per month and covers Workers, Durable Objects, KV, and Hyperdrive together.
Email Sending, if the agent uses it, includes 3,000 messages per account per month and then runs $0.35 per 1,000. Email Routing for inbound is unlimited on both Free and Paid plans.
For an agent with light traffic the practical bill is close to the platform minimum, which is unusual in this category. The cost model rewards agents that idle cheaply and wake on events, and it punishes agents that hold long-lived compute, which is broadly the right incentive.
The real constraint
The SDK is TypeScript on Workers. That is not a footnote, it is the central trade.
If your stack is already TypeScript and already on Cloudflare, this is close to ideal. Deploy once, get global distribution, and the durable primitives that normally take a sprint to assemble are there on day one.
If your agent logic is in Python, which describes a large share of the field, the SDK is not where you are going. You can call Cloudflare services from Python, and the Email Sending REST API has an official Python SDK, but the Agent class, the durable state, and the onEmail hook are TypeScript. Google’s ADK, by comparison, ships in Python, Go, Java, and TypeScript, which matters more than the feature comparison for a lot of teams.
The second constraint is scope. This is a builder’s SDK, not a product. Cloudflare gives you excellent primitives and a reference application. It does not give you a working assistant.
If what you want is an agent that already watches your inbox and calendar and acts on what arrives, without a deployment step, Carly starts there instead: free Zapier-style workflows, with AI agents from $35/month. Driving it from your own code, provisioning agents per tenant, or embedding it in your product is available. Book a call with the team and we will scope it to your setup.
How to decide
The question worth asking is which half of the problem is hard for you.
If the hard part is reasoning quality, tool selection, or prompt design, the SDK does not help much, and you would pick it for infrastructure reasons rather than intelligence ones.
If the hard part is that your agent needs to remember things, wake up on a schedule, survive failures, hold a WebSocket open, and answer email, then the SDK is doing real work that you would otherwise assemble from four services. That is the case it was designed for, and the case where it is hard to beat on either effort or price.
FAQ
Is the Cloudflare Agents SDK free?
The SDK itself has no license fee. It runs on Cloudflare Workers, so you pay for the platform and consumption. The Workers Paid plan starts at $5 per month and includes Workers, Durable Objects, and KV.
What languages does it support?
TypeScript, running on Workers. Other languages can call Cloudflare services over REST, and the Email Sending API has official Node, Python, and Go SDKs, but the agent primitives themselves are TypeScript.
What are Durable Objects and why do they matter here?
They are Cloudflare’s stateful compute primitive: a single addressable instance with its own persistent storage. They are what lets an agent have a durable identity and remember prior interactions instead of starting cold on every request.
Can agents built with it use MCP?
Yes. MCP tools are a supported tool type, so an agent can call anything exposed through an MCP server rather than only functions you defined in your own codebase.
Can it send and receive email?
Yes. Outbound uses the Email Sending binding, inbound routes through Email Routing to your Worker, and agents implement an onEmail hook to handle parsed messages with state persisting across a thread.
Ready to automate your busywork?
Carly schedules, researches, and briefs you—so you can focus on what matters.
See what people say
"Before Carly, I relied on a Calendly link, but the whole process felt impersonal and not very professional. Carly changed that by handling all the back-and-forth, so I'm no longer stuck in endless email threads trying to line up schedules.
Now Carly reaches out to candidates, shares my real-time availability, lets them pick a slot, then sends a Zoom link and drops it straight into my calendar. She sends reminders to both of us before each call, which has significantly reduced no-shows and last-minute confusion.
On top of scheduling, Carly acts like a full executive assistant, sending me my schedule the night before so I can prepare for each call. It reminds me of the old x.ai assistant, but Carly is noticeably smarter, faster, and better suited to my healthcare recruitment business."


