agents-sdk
Skill by cloudflare
Helps an AI assistant build, debug, or review Cloudflare Agents SDK applications that use the agents package. Aimed at developers building agents on Cloudflare Workers.
Install agents-sdk
Built from the published package, never by AI.
git clone --depth 1 https://github.com/cloudflare/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/agents-sdk ~/.claude/skills/agents-sdkRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/cloudflare/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/agents-sdk ~/.gemini/antigravity-cli/skills/agents-sdkAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The Cloudflare Agents SDK skill helps an AI assistant build, debug, or review applications that use the agents package. It tells the assistant to prefer retrieving current Cloudflare docs over its training data, and it lists docs pages for topics such as state, scheduling, MCP, and chat agents. It also includes examples for wrangler configuration, the Agent class, routing URLs, and core APIs.
The skill covers SQLite-backed state synced to clients, callable RPC methods over WebSocket, scheduling, workflows, durable execution, a built-in queue, and retries. It includes reference files for the MCP client and server, email, webhooks, observability, and React hooks. It is aimed at developers building agents on Cloudflare Workers with Durable Objects.
Written from the project's SKILL.md and checked against it.
What it can do
- Persistent stateStores agent state in SQLite and syncs it to clients via setState.
- Callable RPCExposes @callable() methods that clients invoke over WebSocket.
- SchedulingRuns one-time, recurring, and cron tasks with schedule() and scheduleEvery().
- WorkflowsRuns durable multi-step background processing with AgentWorkflow.
- Durable executionUses runFiber() and stash() for work that survives Durable Object eviction.
- Queue and retriesProvides a built-in FIFO queue via queue() and retries with this.retry().
- MCP integrationCovers connecting to MCP servers and building them with createMcpHandler.
- Streaming chatCovers AIChatAgent with resumable streams, message persistence, and tools.
- React hooksCovers useAgent and useAgentChat for client applications.
- Email and webhooksCovers email routing and receiving and verifying external webhooks.
What you need
- npm to install the agents package
- A Cloudflare Workers project with a wrangler.jsonc file
- Durable Objects bindings and migrations for each agent class
- Workers AI binding if using Workers AI
Try asking
- Create a Cloudflare agent with persistent state and a callable increment method
- Debug why my agent's @callable method is not being invoked
- Review my wrangler.jsonc for Agents SDK Durable Object migrations
Good to know
- Voice, browser tools, and Think are marked experimental.
- Do not enable experimentalDecorators in tsconfig, because it breaks @callable.
- Never edit old migrations. Add a new tag for each change.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/agents-sdk/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md12 KB -
references/browse-the-web.md2 KB -
references/callable.md2 KB -
references/client-sdk.md1 KB -
references/codemode.md3 KB
Show all 21 files
-
references/configuration.md2 KB -
references/durable-execution.md2 KB -
references/email.md3 KB -
references/human-in-the-loop.md929 B -
references/mcp.md1 KB -
references/observability.md1 KB -
references/queue-retries.md1 KB -
references/routing.md2 KB -
references/server-driven-messages.md868 B -
references/skill-feedback.md3 KB -
references/state-scheduling.md2 KB -
references/streaming-chat.md1 KB -
references/think.md3 KB -
references/voice.md2 KB -
references/webhooks-push.md2 KB -
references/workflows.md2 KB
Alternatives to agents-sdk
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
agents-sdk: common questions
Does this skill use the latest Agents SDK docs?
The skill tells the assistant to prefer retrieval from Cloudflare docs over pre-training, since its knowledge of the SDK may be outdated. It links docs pages for each topic.
Which agent types does the skill cover?
It covers base agents, AIChatAgent chat agents, and the experimental Think class. It also covers MCP servers and clients, email, and voice.
What does the skill help with besides writing code?
It is described as useful for debugging and reviewing Agents SDK applications, as well as building them.
How do I install agents-sdk?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is agents-sdk free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is agents-sdk safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to agents-sdk?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
