Back to directory

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.

Visit website (opens in a new tab)developers.cloudflare.com
Cloudflare Agents

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.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.