skillfed

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

2,499 235 Apache-2.0 updated by cloudflare

Install

cloudflare/skills/agents-sdk · repository language: Shell

CLI (skillfed)coming soon
git clone https://github.com/cloudflare/skills
cp -r skills/skills/agents-sdk ~/.claude/skills/agents-sdk

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)

Read as markdown · JSON record · Browse the source repository

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

Related skills

Tags

serverless-agents durable-workflows state-persistence rpc-streaming ai-orchestration background-jobs mcp-integration chat-interfaces voice-automation