What it does. Your knowledge of the Agents SDK may be outdated. Prefer retrieval over pre-training for any Agents SDK task.
- Persistent state — SQLite-backed, auto-synced to clients via
setState
- Callable RPC — @callable()
methods invoked over WebSocket - Scheduling — One-time, recurring (scheduleEvery
), and cron tasks - Workflows — Durable multi-step background processing via AgentWorkflow
- Durable execution — runFiber()
/ stash()
for work that survives DO eviction - Queue — Built-in FIFO queue with retries via queue()
- Retries — this.retry()
with exponential backoff and jitter - MCP integration — Connect to MCP servers or build your own with McpAgent
- Email handling — Receive and reply to emails with secure routing - Streaming chat — AIChatAgent
with resumable streams, message persistence, tools - Server-driven messages — saveMessages
, waitUntilStable
for proactive agent turns - React hooks — useAgent
, useAgentChat
for client apps - Observability — diagnostics_channel
events for state, RPC, schedule, lifecycle - Push notifications — Web Push + VAPID delivery from agents - Webhooks — Receive and verify external webhooks - Voice (experimental) — STT/TTS via @cloudflare/voice
- Browser tools (experimental) — CDP-powered browsing via agents/browser
- Think (experimental) — Higher-level chat agent via @cloudflare/think
Highlights
- Persistent state — SQLite-backed, auto-synced to clients via
setState
- Callable RPC —
@callable()
methods invoked over WebSocket
- Scheduling — One-time, recurring (
scheduleEvery
), and cron tasks
- Workflows — Durable multi-step background processing via
AgentWorkflow
- Durable execution —
runFiber()
/ stash()
for work that survives DO eviction
When to use it. Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice…
Install
npx skills add cloudflare/skills --skill agents-sdk
Or copy the skill folder manually:
git clone https://github.com/cloudflare/skills.git
cp -r skills/skills/agents-sdk/ ~/.claude/skills/agents-sdk
Source: cloudflare/skills — 2,769 stars, Apache-2.0, last pushed 2026-09-02.