Skip to content
Back to skills

Official Cloudflare Agents Sdk

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
ai-agentstypescriptreactapi

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add iDorgham/Workspace-Factory --skill official_cloudflare_agents_sdk --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Official Cloudflare Agents Sdk?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Official Cloudflare Agents Sdk
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/idorgham-official-cloudflare-agents-sdk/badge)](https://www.skillsdirectory.com/skills/idorgham-official-cloudflare-agents-sdk)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.