# Cloudflare Agents

A framework for building persistent, stateful AI agents on Cloudflare using Durable Objects, so each agent has its own state, storage and lifecycle and hibernates when idle.

Cloudflare Agents lets a developer run one agent per user, session or game room at near-zero idle cost, since an agent hibernates when idle and wakes on demand. A project scaffolds with `npm create cloudflare@latest -- --template cloudflare/agents-starter`, or adds the `agents` package to an existing project.

Its features include persistent state synced automatically to connected clients, callable methods exposed as type-safe RPC through a `@callable()` decorator, parent/child agent composition through facets, agent tools that run chat-capable sub-agents with streaming child timelines, one-time/recurring/cron scheduling, WebSockets with lifecycle hooks, resumable AI chat streaming, MCP server and client support, WebMCP for browser agents, durable multi-step workflows with human-in-the-loop approval, and email and voice integrations.

Each agent is a Durable Object configured with a binding and a SQLite migration in `wrangler.jsonc`. It is written in TypeScript and licensed under MIT.

Website: https://developers.cloudflare.com/agents/
