What problem does it solve?
Cloudflare Workers apps need an easy, reliable way to run AI agents with persistent state, callable actions, and durable workflows, without building all the infrastructure from scratch.
Core Features & Use Cases
- Persistent agent state with SQLite-backed durability and automatic client synchronization.
- Callable RPC via WebSocket using @callable methods, including streaming responses for real-time UX.
- Durable Workflows using AgentWorkflow for multi-step background execution, retries, and human-in-the-loop approvals.
- Scheduling with delays, cron, and fixed intervals for automated tasks.
- MCP integration to connect agents to external MCP servers and expose tools/resources/prompting.
- Email handling to receive and securely reply to emails via Cloudflare Email Routing.
- React hooks (client SDK) to integrate agent state and chat experiences into React apps.
Quick Start
Fetch the latest Agents SDK docs from https://github.com/cloudflare/agents/tree/main/docs and implement an Agent subclass with typed state, a validateStateChange hook, and at least one @callable method that updates state.