Setup & Installation
What This Skill Does
Build stateful AI agents on Cloudflare Workers with persistent SQLite-backed state, WebSocket connections, scheduled tasks, and durable workflows. The SDK provides an Agent class with RPC methods, MCP integration, email handling, and React hooks for client apps.
It handles state persistence, WebSocket lifecycle, and durable execution directly on the Worker runtime, removing the need to wire up external databases, queues, or session storage separately.
When to use it
- Running scheduled cron tasks inside a Cloudflare Worker agent
- Building a chat app where agent state syncs in real time to React clients
- Wiring up an MCP server using McpAgent to expose callable tools
- Handling inbound emails and sending replies through an agent's routing logic
- Pausing a multi-step workflow until a human approves the next action