Back to skills
SKILL.md
Official Cloudflare Agents Sdk
ASecurityBuild 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.
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added November 24, 2026
Works with
Security analysis
100/100npx -y skills add iDorgham/Workspace-Factory --skill official_cloudflare_agents_sdk --agent claude-codeAre you the author of Official Cloudflare Agents Sdk?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/idorgham-official-cloudflare-agents-sdk)---
name: agents-sdk
description: 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.
---
# 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 |
|-------|----------|
| Getting started | https://developers.cloudflare.com/agents/getting-started/quick-start/ |
| Agent class | https://developers.cloudflare.com/agents/api-reference/agents-api/ |
| State | https://developers.cloudflare.com/agents/api-reference/store-and-sync-state/ |
| Chat agents | https://developers.cloudflare.com/agents/api-reference/chat-agents/ |
| MCP server | https://developers.cloudflare.com/agents/api-reference/mcp-agent-api/ |
| Durable execution | https://developers.cloudflare.com/agents/api-reference/durable-execution/ |
## Quick Start
```typescript
import { Agent } from 'agents';
export class MyAgent extends Agent {
async onRequest(request: Request): Promise<Response> {
return new Response('Hello from agent!');
}
}
```
## Key Concepts
- **Agent class**: Extends `Agent` or `AIChatAgent` for chat-based agents
- **State**: Use `setState()` and `validateStateChange()` for persistent state
- **Callable methods**: Use `@callable` decorator for RPC methods
- **Scheduling**: Use `schedule()` and `scheduleEvery()` for timed tasks
- **WebSockets**: Implement `onConnect()`, `onMessage()`, `onClose()` hooks
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.