agents-sdk

Build, debug, and review Cloudflare Agents SDK applications using the agents package.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/bramanda48/skills --skill agents-sdk-bramanda48
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/bramanda48/skills/tree/main/skills/cloudflare-agents-sdk
Command: npx skills add https://github.com/bramanda48/skills --skill agents-sdk-bramanda48

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agents, @cloudflare/ai-chat, ai, @ai-sdk/react, and includes references (resource) components.

What problem does it solve? Building stateful AI agents on Cloudflare Workers requires coordinating Durable Objects, WebSocket routing, scheduling, MCP integration, and streaming chat, and outdated knowledge of the fast-moving Agents SDK leads to broken implementations. ## Core Features & Use Cases - Agent Development Guidance: Covers the Agent class, state persistence, callable RPC methods, routing, scheduling, workflows, durable execution, queues, and retries with correct wrangler configuration. - Chat & Integrations: Provides patterns for AIChatAgent streaming chat, React client hooks, MCP client/server, email handling, webhooks, push notifications, and experimental voice, browser, and Think capabilities. - Use Case: You need to add a streaming chat agent with scheduled reminders to an existing Workers app. The Skill directs you to the right configuration, code patterns, and current documentation while flagging common pitfalls like enabling experimentalDecorators. ## Quick Start Ask the agent to scaffold a Cloudflare Agents SDK chat agent with wrangler configuration and a React client using the agents package.

Frequently Asked Questions about agents-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a chat agent with the Cloudflare Agents SDK?

Extend AIChatAgent from the agents package, implement onChatMessage with streamText, and route requests with routeAgentRequest. Install agents, @cloudflare/ai-chat, ai, and @ai-sdk/react, then connect clients with the useAgentChat React hook.

How do I configure wrangler for Cloudflare agents?

Add a durable_objects binding for each agent class, a migrations entry with new_sqlite_classes, and the nodejs_compat compatibility flag. Never edit old migrations; add new tags for new classes, and regenerate types with npx wrangler types.

Why does @callable not work in my Cloudflare agent?

The @callable decorator breaks when experimentalDecorators is enabled in tsconfig. Extend the agents/tsconfig instead, and verify each agent class has its own Durable Object binding and migration entry.

Can Cloudflare agents connect to MCP servers?

Yes, the Agents SDK includes an MCP client API for connecting to remote servers and createMcpHandler for building your own MCP servers. It supports Streamable HTTP, SSE, and RPC transports, with OAuth guidance for securing servers.

What is the difference between Think and AIChatAgent?

Think is an experimental higher-level class that handles the streamText loop, tool execution, and persistence automatically via getModel and getSystemPrompt overrides. AIChatAgent gives full control inside onChatMessage but requires wiring the streaming loop yourself.