What is Cloudflare Agents SDK?
Latest launch MIT
Summary
Cloudflare's MIT TypeScript SDK (npm: agents) for durable agents on Durable Objects, with state, scheduling, MCP, browser tools and harnesses.
- Category
- Frameworks
- Open source
- Yes
- License
- MIT
- MCP
- Yes
- Pricing
- The SDK is MIT and free on npm; agents run on Cloudflare Workers and Durable Objects, billed under Cloudflare's own plans.
The Cloudflare Agents SDK is the agents package on npm, built at cloudflare/agents under MIT. Its docs describe an agent as a Durable Object running the SDK's Lifecycle. The Lifecycle handles requests, alarms and WebSocket events, and starts the capabilities you add with .use(): State, WebSockets, Scheduler and MCPClientManager. The Agent class is a preset with those already installed.
The loop itself is a harness, such as Pi, OpenCode or Cloudflare's Think. Tools include a Cloudflare Computer workspace, a sandbox, a browser, web fetch and search, MCP servers, AI Search and payments. Channels cover chat, voice, email, Slack and webhooks.
Releases are frequent (nine agents versions between October 2 and October 29, 2026), and minor versions can break APIs. Read each release's "Upgrading" notes.
Latest release covered: Agents SDK 0.32.0, October 29, 2026. For running untrusted code next to an agent, see the Cloudflare Sandbox SDK. Compare Mastra and the OpenAI Agents SDK in the frameworks category.
Cloudflare Agents SDK alternatives
| Tool | License | Pricing note |
|---|---|---|
Cloudflare Agents SDKThis pageCloudflare's MIT TypeScript SDK (npm: agents) for durable agents on Durable Objects, with state, scheduling, MCP, browser tools and harnesses. | MIT | The SDK is MIT and free on npm; agents run on Cloudflare Workers and Durable Objects, billed under Cloudflare's own plans. |
MastraTypeScript agent framework. Mastra Code is the terminal agent; AgentController is the extracted loop, in @mastra/core 1.47.0 or later. | Open source | Mastra Code and AgentController are announced as open source. No license fee is stated in the posts we cited. |
OpenAI AgentsOpenAI's agent harness, shipped as a Python SDK update in April 2026 and as the hosted Agents API in September 2026. | Open source | SDK and Agents API use standard token and tool pricing. The Agents API has no additional fee. |
LangGraphLangGraph is an open-source orchestration runtime for building stateful, resilient agents. | MIT | Not stated |
Cloudflare Sandbox SDKCloudflare's SDK for running untrusted or generated code in isolated sandboxes via a Worker. | — | Not stated |
Launches and updates
Cloudflare Agents SDK 0.32.0 rebuilds Agent Skills loading
Cloudflare Agents SDKCloudflare agents 0.32.0 (October 29, 2026) replaces SkillRegistry with spec-checked skills from workspaces, R2 or code and adds OpenTelemetry spans.
Category: Frameworks
Pricing: Open source
Questions
What is the Cloudflare Agents SDK?
The npm package agents from cloudflare/agents. The docs say each agent is a Durable Object with a durable identity, local SQL storage, real-time connections, scheduled work and recoverable execution, and that you add capabilities such as State, WebSockets, Scheduler and an MCP client with .use().
Is the Cloudflare Agents SDK open source?
Yes. The GitHub API and npm both report the MIT license for cloudflare/agents and the agents package.
Which agent loops does it run?
The docs call the agent loop a harness and list Pi, OpenCode and Think. The getting-started guide uses the Pi harness through optional peer dependencies (@earendil-works/pi-durable and pi-ai), with Workers AI as the model so no API key is needed.
Can it serve or call MCP servers?
Both. agents/mcp and agents/mcp/server serve MCP, and agents/mcp/client connects to remote servers. Since 0.31.0 the MCP packages are optional peer dependencies you add yourself.