
Cloudflare Agents
This is Cloudflare's official framework for building AI agents that run on Workers. You get tool registration, streaming responses, and bindings for D1, KV, R2, and Durable Objects baked in. The documentation is comprehensive with 13 templates covering everything from basic agents to browser automation, RAG, and MCP integration. It supports OpenAI, Anthropic, and Google models out of the box. If you're already on Cloudflare's platform and want to build agentic workflows without managing separate infrastructure, this gives you a batteries-included approach. The state management and workflow guides are especially thorough at 388 and 637 lines respectively, which suggests they've thought through the hard parts of running stateful agents at the edge.
- skills.sh installs
- 389
- GitHub stars
- 248
- last updated
- Aug 21, 2026
Install
$ npx -y skills add secondsky/claude-skills --skill cloudflare-agents --agent claude-codeInstalls into .claude/skills of the current project.
Files
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 preventionreferences/configuration-guide.md(152 lines) - Complete configuration deep divereferences/agent-api.md(115 lines) - Complete Agent Class API reference
Sponsors
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- DevOps & CI/CD, AI & Agent Building, Cloud & Infrastructure
- First seen
- Jun 3, 2026
More from secondsky/claude-skills
All 146- Cloudflare Mcp Server388
- Thesys Generative Ui384
- Access Control Rbac381
- Maz Ui380
- React Best Practices380
- Woocommerce Backend Dev379
- Woocommerce Code Review379
- Bun Hono Integration376
- Bun Test Basics375
- Woocommerce Copy Guidelines374
- Woocommerce Dev Cycle374
- Cloudflare Workers Security369
- Bun Nextjs358
- Bun Package Manager358
- Bun Drizzle Integration353
- Bun Docker343
- Bun Runtime342
- Cloudflare Workers Testing340
- Bun Cloudflare Workers338
- Bun Test Coverage337
- Bun Http Server336
- Bun Test Mocking335
- Nuxt Seo335
- Bun Bundler334