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, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
92
89%
Does it follow best practices?
Impact
99%
2.20xAverage score across 3 eval scenarios
Low
Low-risk findings worth noting
The canonical home for this skill is agents-sdk in cloudflare/skills
Stateful agent wrangler config and state lifecycle
new_sqlite_classes in migrations
100%
100%
durable_objects binding
100%
100%
Import from 'agents' package
100%
100%
routeAgentRequest with 404 fallback
100%
100%
validateStateChange throws to reject
0%
100%
onStateUpdate is non-blocking side effect
0%
100%
this.sql template literals
100%
100%
Cron or scheduleEvery for daily cleanup
100%
100%
Callable RPC streaming and durable AgentWorkflow
@callable decorator on streaming method
0%
100%
streaming: true option
0%
100%
StreamingResponse as first param
0%
100%
stream.send and stream.close called
0%
80%
AgentWorkflow from agents/workflows
0%
100%
step.do() for durable steps
100%
100%
step.reportComplete or step.mergeAgentState
0%
100%
Workflow in wrangler.jsonc
100%
100%
MCP server with McpAgent tools and resources
McpAgent import from agents/mcp
0%
100%
@modelcontextprotocol/sdk dependency
100%
100%
zod dependency
100%
100%
McpServer in constructor/field
100%
100%
Resources registered in init()
0%
100%
Tools registered in init()
0%
100%
Streamable HTTP serve, not serveSSE
33%
100%
new_sqlite_classes in wrangler migrations
0%
100%
d416fd5
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.