agents
Build and deploy AI Agents on Cloudflare
What is agents?
Build and deploy AI Agents on Cloudflare
Overview of agents
What it is
Cloudflare Agents is an open-source framework for building and deploying AI agents on Cloudflare's edge network. Each agent runs as a persistent, stateful Durable Object that can hibernate when idle and wake on demand, enabling millions of agents to run cost-effectively. The framework provides built-in support for real-time communication, scheduling, AI model calls, MCP, workflows, and more.
Key features
- Persistent state that syncs to all connected clients and survives restarts
- Callable methods via the
@callable()decorator for type-safe RPC - Sub-agents (facets) for parent/child composition with nested routing
- Scheduling with one-time, recurring, and cron-based tasks
- WebSockets for real-time bidirectional communication with lifecycle hooks
- AI chat with message persistence, resumable streaming, and tool execution
- MCP support: act as MCP servers or connect as MCP clients (HTTP, SSE, RPC, elicitation)
Use cases
Cloudflare Agents is suitable for building per-user or per-session AI assistants, real-time collaborative applications, game rooms, voice agents, email agents, workflow systems with human-in-the-loop approval, and browser-based agents. The framework includes 30+ example demos covering chat, MCP, code mode, voice, workflows, auth, payments, and games.
Getting started
shnpm create cloudflare@latest -- --template cloudflare/agents-starterOr add to an existing project:shnpm install agents
License and pricing
This project is open-source under the MIT license. Pricing is not stated in the provided materials.
Based on the project's public README and repository metadata.