agents-sdk
Build stateful AI agents on Cloudflare Workers with persistent state, RPC methods, scheduling, and workflow orchestration.
What it does
- 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
Requirements & configuration
- Each agent class needs its own DO binding + migration entry
Configuration: SELECT
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
Build stateful AI agents on Cloudflare Workers with persistent state, RPC methods, scheduling, and workflow orchestration.
Source
Repository: https://github.com/cloudflare/skills
agents-sdk FAQ
What does the agents-sdk skill do?
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 agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge. Persistent state — SQLite-backed, auto-synced to clients via setState Callable RPC — @callable() methods invoked over WebSocket
What does agents-sdk require?
Each agent class needs its own DO binding + migration entry Configuration keys: SELECT.
How do I install agents-sdk?
Run: npx -y skills add https://github.com/cloudflare/skills --skill agents-sdk --agent claude-code — the source lives at github.com/cloudflare/skills.
Maintain agents-sdk?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/cloudflare-skills-agents-sdk?ref=badge) npx agentictools info skills/cloudflare-skills-agents-sdk The second line is the CLI lookup for this page — handy in READMEs and docs.