cloudflare-agents
Build AI agents with Cloudflare Agents SDK on Workers + Durable Objects. Provides WebSockets, state persistence, scheduling, and multi-agent coordination. Prevents 23 documented errors. Use when: building WebSocket agents, RAG with Vectorize, MCP servers, or troubleshooting "Agent class must extend", "new_sqlite_classes", binding errors, WebSocket payload limits.
npx skills add majiayu000/claude-skill-registry --skill cloudflare-agents-brendadeeznuts1111-tier-1380-omega --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Build AI agents with Cloudflare Agents SDK on Workers + Durable Objects. Provides WebSockets, state persistence, scheduling, and multi-agent coordination. Prevents 23 documented errors.
How it works
Describes infrastructure-level features: WebSocket connections, Durable Objects wrappers for globally unique agent instances, built-in SQLite state persistence up to 1GB per agent, and scheduling capabilities via this.schedule() with cron or delays. Supports multi-agent coordination via routeAgentRequest() and lifecycle methods like onStart/onConnect/onMessage/onClose. Offers client libraries such as useAgent, AgentClient, and agentFetch. Emphasizes that it does NOT provide AI inference or streaming parsing; you bring your own AI SDK or provider.
When to use it
Use when you need WebSocket bidirectional communication, durable stateful agents, multi-agent coordination, scheduling, or human-in-the-loop workflows, especially for long-running agents or MCP servers.
What it can touch
- WebSocket connections
- Durable Objects bindings
- SQLite state storage (up to 1GB per agent)
- Scheduling with this.schedule()
- Multi-agent routing via routeAgentRequest()
- Client libraries: useAgent, AgentClient, agentFetch
Caveats
- Not an AI inference provider; requires integrating an AI SDK/provider separately
- Requires Durable Objects setup and potential migrations (e.g., new_sqlite_classes) as described in examples
- Complexity and code footprint are higher compared to using AI SDK alone
# Cloudflare Agents SDK **Status**: Production Ready ✅ **Last Updated**: 2026-01-09 **Dependencies**: cloudflare-worker-base (recommended) **Latest Versions**: agents@0.3.3, @modelcontextprotocol/sdk@latest **Production Tested**: Cloudflare's own MCP servers (https://github.com/cloudflare/mcp-server-cloudflare) **Recent Updates (2025-2026)**: - **Jan 2026**: Agents SDK v0.3.6 with callable methods fix, protocol version support updates - **Nov 2025**: Agents SDK v0.2.24+ with **resumable streaming** (streams persist across disconnects, page refreshes, and sync across tabs/devices), MCP client improvements, schedule fixes - **Sept 2025**: AI SDK v5 compatibility, automatic message migration - **Aug 2025**: MCP Elicitation support, http-streamable transport, task queues, email integration - **April 2025**: MCP support (MCPAgent class), `import { context }` from agents - **March 2025**: Package rename (agents-sdk → agents) ### Resumable Streaming (agents@0.2.24+) AIChatAgent now supports **resumable streaming**, enabling clients to reconnect and continue receiving streamed responses without data loss. This solves critical real-world scenarios: - Long-running AI responses that exceed co
- Resumable Streaming (agents@0.2.24+)
- What is Cloudflare Agents?
- Do You Need Agents SDK?
- Use JUST Vercel AI SDK (Simpler) When:
- Use Agents SDK When You Need:
- Key Understanding: What Agents SDK IS vs IS NOT
- Decision Flowchart
- Architecture Comparison
- Still Not Sure?
- Quick Start (10 Minutes)
- 1. Scaffold Project with Template
- 2. Or Add to Existing Worker
- 3. Configure Durable Objects Binding
- 4. Deploy
npm create cloudflare@latest my-agent -- \ cd my-existing-worker npm install agents npx wrangler@latest deploy npm install @modelcontextprotocol/sdk agents Run MCP inspector npx @modelcontextprotocol/inspector@latest Connect to: http://localhost:8788/mcp
What does the cloudflare-agents skill do?
Build AI agents with Cloudflare Agents SDK on Workers + Durable Objects. Provides WebSockets, state persistence, scheduling, and multi-agent coordination. Prevents 23 documented errors. Use when: building WebSocket agents, RAG with Vectorize, MCP servers, or troubleshooting "Agent class must extend", "new_sqlite_classes", binding errors, WebSocket payload limits.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill cloudflare-agents-brendadeeznuts1111-tier-1380-omega --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
