← Registry
Agent Official

Agents SDK (Cloudflare Agents SDK)

Cloudflare's SDK for building and deploying stateful, persistent AI agents on Workers and Durable Objects, with built-in state, scheduling, WebSockets, MCP, and React hooks.

Install

npm create cloudflare@latest -- --template cloudflare/agents-starter
$

A framework for building and hosting stateful AI agents on Cloudflare's network, where each session gets a durable identity, local SQL storage, real-time WebSocket connections, scheduled work, and recoverable execution. Tools include browser automation, sandboxed code execution, AI Search, MCP, and payments, and the starter ships streaming chat plus human-in-the-loop approval. Use it when you need persistent-memory agents that scale globally without managing servers; the starter runs on Workers AI with no API keys, and you can swap in OpenAI, Anthropic, or Gemini.