Skip to content
Back to skills

Cloudflare Agents

ASecurity

Build AI agents on Cloudflare Workers with MCP integration, tool use, and LLM providers.

  • 222 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 7, 2026
developmenttypescriptgoreactapidocumentation

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add secondsky/claude-skills --skill cloudflare-agents --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cloudflare Agents?

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

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

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: cloudflare-agents
description: Build AI agents on Cloudflare Workers with MCP integration, tool use, and LLM providers.
license: MIT
---

# Cloudflare Agents

**Last Updated**: 2025-11-21

## Quick Start

```typescript
export default {
  async fetch(request, env, ctx) {
    const agent = {
      tools: [
        { name: 'getTodo', handler: async ({id}) => ({id, title: 'Task'}) }
      ],
      async run(input) {
        return await processWithLLM(input, this.tools);
      }
    };
    
    return Response.json(await agent.run(await request.text()));
  }
};
```

## Core Features

- **Tool Integration**: Register and execute tools
- **LLM Providers**: OpenAI, Anthropic, Google Gemini
- **MCP Protocol**: Model Context Protocol support
- **Cloudflare Bindings**: D1, KV, R2, Durable Objects

## Agent Pattern

```typescript
const agent = {
  tools: [...],
  systemPrompt: 'You are a helpful assistant',
  model: 'gpt-4o',
  async run(input) {
    // Process with LLM
  }
};
```

## Resources

### Core Documentation
- `references/patterns-concepts.md` (317 lines) - What is Cloudflare Agents, patterns & concepts, critical rules, known issues prevention
- `references/configuration-guide.md` (152 lines) - Complete configuration deep dive
- `references/agent-api.md` (115 lines) - Complete Agent Class API reference

### Integration Guides
- `references/http-sse-guide.md` (74 lines) - HTTP & Server-Sent Events
- `references/websockets-guide.md` (110 lines) - WebSocket integration
- `references/state-management.md` (388 lines) - State management, scheduled tasks, workflows
- `references/mcp-integration.md` (130 lines) - Model Context Protocol integration

### Advanced Features
- `references/advanced-features.md` (637 lines) - Browser automation, RAG, AI model integration, calling agents, client APIs

### Error Reference
- `references/error-catalog.md` (10 lines) - Common errors and solutions

### Templates
- `templates/basic-agent.ts` - Basic agent setup
- `templates/browser-agent.ts` - Browser automation
- `templates/calling-agents-worker.ts` - Calling other agents
- `templates/chat-agent-streaming.ts` - Streaming chat agent
- `templates/hitl-agent.ts` - Human-in-the-loop
- `templates/mcp-server-basic.ts` - MCP server integration
- `templates/rag-agent.ts` - RAG implementation
- `templates/react-useagent-client.tsx` - React client integration
- `templates/scheduled-agent.ts` - Scheduled tasks
- `templates/state-sync-agent.ts` - State synchronization
- `templates/websocket-agent.ts` - WebSocket agent
- `templates/workflow-agent.ts` - Workflows integration
- `templates/wrangler-agents-config.jsonc` - Wrangler configuration

**Official Docs**: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-agents/

Files in this skill

  • SKILL.md2.7 KB
  • references/advanced-features.md13.6 KB
  • references/agent-api.md2.9 KB
  • references/configuration-guide.md3.1 KB
  • references/error-catalog.md275 B
  • references/http-sse-guide.md2 KB
  • references/mcp-integration.md2.7 KB
  • references/patterns-concepts.md11 KB
  • references/state-management.md9.5 KB
  • references/websockets-guide.md3 KB
  • templates/basic-agent.ts383 B
  • templates/browser-agent.ts4.9 KB
  • templates/calling-agents-worker.ts3.7 KB
  • templates/chat-agent-streaming.ts1.5 KB
  • templates/hitl-agent.ts6.6 KB
  • templates/mcp-server-basic.ts4 KB
  • templates/rag-agent.ts4.8 KB
  • templates/react-useagent-client.tsx5.5 KB
  • templates/scheduled-agent.ts4.5 KB
  • templates/state-sync-agent.ts3.9 KB

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.

Comments

Loading comments…