skillfed

cloudflare-agents

Deploy intelligent agents directly on Cloudflare Workers with built-in support for multiple LLM providers and the Model Context Protocol. Register custom tools, manage state across Cloudflare bindings, and handle real-time interactions via HTTP, WebSockets, or Server-Sent Events.

Cloudflare Agents lets you build and deploy AI agents on Cloudflare Workers with LLM and tool integration.

AI-generated summary based on this skill's SKILL.md

196 29 MIT updated by secondsky

Install

secondsky/claude-skills/cloudflare-agents · repository language: TypeScript

git clone https://github.com/secondsky/claude-skills
cp -r claude-skills/plugins/cloudflare-agents/skills/cloudflare-agents ~/.claude/skills/cloudflare-agents
npx skillfed install secondsky/claude-skills/cloudflare-agents

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I build AI agents on Cloudflare Workers?

cloudflare-agents lets you deploy intelligent agents directly on Cloudflare Workers with built-in support for multiple LLM providers and the Model Context Protocol. You can register custom tools, manage state across Cloudflare bindings, and handle real-time interactions via HTTP, WebSockets, or Server-Sent Events to create responsive, serverless AI agents.

What LLM providers does cloudflare-agents support?

cloudflare-agents integrates with multiple LLM providers through a unified interface. You can use OpenAI, Anthropic, and other providers by configuring them with the Model Context Protocol (MCP). This allows you to switch between providers or use multiple simultaneously within your agent implementation on Workers.

Can cloudflare-agents implement RAG and browser automation?

Yes, cloudflare-agents supports advanced agent patterns including Retrieval-Augmented Generation (RAG) and browser automation. These patterns enable your agents to retrieve contextual information and interact with web pages, extending their capabilities beyond simple LLM calls to perform complex, multi-step tasks on Cloudflare Workers.

How does cloudflare-agents handle state management?

cloudflare-agents provides built-in state management through Cloudflare bindings, allowing you to persist and retrieve agent state across requests. Combined with streaming support for real-time interactions, this enables stateful conversations and complex workflows while maintaining the serverless architecture of Cloudflare Workers.

What communication protocols does cloudflare-agents support?

cloudflare-agents handles real-time interactions through multiple protocols: HTTP for standard request-response patterns, WebSockets for persistent bidirectional communication, and Server-Sent Events (SSE) for server-to-client streaming. This flexibility lets you choose the best transport for your agent's use case on Workers.

Is cloudflare-agents open source and what license does it use?

Yes, cloudflare-agents is open source under the MIT license, allowing you to freely use, modify, and distribute it in your projects. This permissive license makes it easy to integrate the framework into commercial and personal applications.

SKILL.md

rendered from the published skill — quoted content, verbatim

Cloudflare Agents

Last Updated: 2025-11-21

Quick Start

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

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

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 15 files
plugins/cloudflare-agents/skills/cloudflare-agents/SKILL.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/advanced-features.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/agent-api.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/configuration-guide.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/error-catalog.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/http-sse-guide.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/mcp-integration.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/patterns-concepts.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/state-management.md
plugins/cloudflare-agents/skills/cloudflare-agents/references/websockets-guide.md
plugins/cloudflare-agents/skills/cloudflare-agents/templates/basic-agent.ts
plugins/cloudflare-agents/skills/cloudflare-agents/templates/browser-agent.ts
plugins/cloudflare-agents/skills/cloudflare-agents/templates/calling-agents-worker.ts
plugins/cloudflare-agents/skills/cloudflare-agents/templates/chat-agent-streaming.ts
plugins/cloudflare-agents/skills/cloudflare-agents/templates/hitl-agent.ts

Related skills

Tags

serverless-ai agent-framework llm-integration tool-orchestration edge-computing mcp-protocol agentic-workflows browser-automation rag-systems