agents-sdk
Agents SDK equips you to create intelligent agents on Cloudflare Workers with built-in state persistence, callable RPC methods, task scheduling, and durable workflows. It covers agent lifecycle management, WebSocket communication, chat integration, MCP server connectivity, and observability—all with comprehensive Cloudflare documentation as your primary reference.
Agents SDK lets you build stateful AI agents on Cloudflare Workers with persistent state, scheduling, workflows, and real-time communication.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-24
Agents SDK lets you build stateful AI agents on Cloudflare Workers with persistent state, scheduling, workflows, and real-time communication. Agents SDK equips you to create intelligent agents on Cloudflare Workers with built-in state persistence, callable RPC methods, task scheduling, and durable workflows. It covers agent lifecycle management, WebSocket communication, chat integration, MCP server connectivity, and observability—all with comprehensive Cloudflare documentation as your primary reference.
Use it when
- Agents SDK offers comprehensive state management through built-in persistence layers.
- Yes, Agents SDK supports real-time WebSocket communication for building interactive agents on Cloudflare Workers.
Verify before relying
Read SKILL.md below before installing (20 files). Open directory: indexed for reading, not audited.
Install
cloudflare/skills/agents-sdk · repository language: Shell
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I build AI agents on Cloudflare Workers?
Agents SDK enables you to build AI agents on Cloudflare Workers by providing a complete framework for agent lifecycle management, state persistence, and durable execution. Start by defining your agent's behavior, configure state storage using Cloudflare's durable storage options, and deploy callable RPC methods that your agent can invoke. The SDK handles scheduling, retries, and observability out of the box, letting you focus on agent logic rather than infrastructure.
What state management capabilities does Agents SDK provide?
Agents SDK offers comprehensive state management through built-in persistence layers, including SQLite support for agent state storage on Cloudflare Workers. You can maintain stateful agents across multiple invocations, implement durable workflows that survive failures, and configure automatic retries. The framework tracks agent execution history and enables you to query and restore agent state at any point in its lifecycle.
Can Agents SDK handle real-time WebSocket communication?
Yes, Agents SDK supports real-time WebSocket communication for building interactive agents on Cloudflare Workers. You can integrate WebSocket connections directly into your agent workflows, enabling live chat interactions, streaming responses, and real-time tool execution. The SDK manages connection lifecycle, message routing, and state synchronization across WebSocket sessions.
How do I integrate MCP servers with Agents SDK?
Agents SDK provides native integration with MCP (Model Context Protocol) servers, allowing your agents to connect to external tools and data sources. Configure MCP server endpoints in your agent configuration, and the SDK handles protocol negotiation, request routing, and response processing. This enables your agents to access specialized capabilities beyond their core logic.
What observability and diagnostics does Agents SDK offer?
Agents SDK includes built-in observability features for monitoring agent execution, tracking state changes, and diagnosing issues. You get comprehensive logging, execution traces, and diagnostic data that integrate with Cloudflare's monitoring tools. Set up alerts for agent failures, track performance metrics, and analyze agent behavior through detailed execution history.
How do I schedule tasks and set up durable execution?
Agents SDK supports scheduled task execution through cron-like scheduling and durable workflows that persist across worker restarts. Define scheduled tasks within your agent configuration, and the SDK ensures reliable execution with automatic retries and failure recovery. Durable execution guarantees that long-running workflows complete even if individual worker instances fail.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Cloudflare Agents SDK
Your knowledge of the Agents SDK may be outdated. Prefer retrieval over pre-training for any Agents SDK task.
Retrieval Sources
Cloudflare docs: https://developers.cloudflare.com/agents/
| Topic | Docs URL | Use for |
|---|---|---|
| Getting started | Quick start | First agent, project setup |
| Adding to existing project | Add to existing project | Install into existing Workers app |
| Configuration | Configuration | wrangler.jsonc, |
(truncated - see the full file via the links below)
File tree — 15 files
skills/agents-sdk/SKILL.md
skills/agents-sdk/references/browse-the-web.md
skills/agents-sdk/references/callable.md
skills/agents-sdk/references/client-sdk.md
skills/agents-sdk/references/codemode.md
skills/agents-sdk/references/configuration.md
skills/agents-sdk/references/durable-execution.md
skills/agents-sdk/references/email.md
skills/agents-sdk/references/human-in-the-loop.md
skills/agents-sdk/references/mcp.md
skills/agents-sdk/references/observability.md
skills/agents-sdk/references/queue-retries.md
skills/agents-sdk/references/routing.md
skills/agents-sdk/references/server-driven-messages.md
skills/agents-sdk/references/state-scheduling.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Build and deploy stateful AI agents on Cloudflare Workers”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Learn the core runtime APIs that power Cloudflare Workers development. This skill covers Fetch for making and handling HTTP requests, Streams for processing large payloads efficiently, Crypto for hashing and signing operations, Cache for response optimization, WebSockets for real-time connections, and text encoding utilities. Includes patterns for timeouts, retries, and error prevention.
This skill guides you through creating and deploying Model Context Protocol servers on Cloudflare Workers, complete with custom tools and optional OAuth authentication. Define tools using TypeScript, configure your server entry point, test locally with the MCP Inspector, then deploy to Workers in minutes. Includes patterns for input validation, environment bindings, and connecting clients like Claude Desktop.
This skill generates production-ready AI agents deployed to Cloudflare Workers using the Agents SDK. It handles persistent state management, real-time WebSocket communication, scheduled background tasks, and tool calling—everything needed for stateful, scalable agent applications.
Create Model Context Protocol servers running on Cloudflare Workers using TypeScript. Define tools, resources, and prompts that AI agents can invoke, with support for multiple transports including WebSocket and HTTP. Includes templates, deployment guides, and Durable Objects integration for stateful applications.
Cloudflare Email Service enables transactional email sending through a Workers binding or REST API, supporting deployment across Workers, the Agents SDK, and external applications. Configure your domain with wrangler, then send emails with minimal setup—no API keys required for Workers. The skill covers sending mechanics, email routing for inbound messages, authentication best practices, and common configuration pitfalls.
dashboard-forge handles vendor dashboard operations that have no public API by driving a real Chrome browser with persistent per-site profiles, letting humans handle logins once while scripts execute the rest reproducibly. It extracts secrets safely to vault, survives UI drift through step-and-shoot methodology, and covers tasks like minting scoped tokens and creating OAuth apps where the vendor offers no API or your existing token lacks scope.
More skills agentcore-investigation (Apache-2.0) · Cloudflare Agentic Inbox (NOASSERTION) · cloudflare-agents (MIT) · cloudflare-workers-ai (MIT) · cloudflare (Apache-2.0)