CA
Infrastructure · Freemium · Open source · Dev setup

Cloudflare Agents SDK

Build stateful globally distributed AI agents on Durable Objects, SQLite, and Workers

What you stop vibecoding

Replaces hand-rolled scripts and custom glue code for sandboxes & code execution workflows.

Dossier overview

Cloudflare Agents SDK lets developers deploy persistent AI agents directly on Cloudflare's edge network using Durable Objects, WebSockets, scheduled tasks, SQLite state, and built-in remote MCP server hosting.

Quickstart

npm i agents

Best use cases

  • Deploying stateful per-user agents with embedded SQLite
  • Hosting remote OAuth-protected MCP servers at the edge
  • Running scheduled background agent loops with zero idle cost

Field notes

Strengths

  • Hibernatable WebSockets and scheduled alarms
  • Embedded SQLite database per agent instance
  • Open-source codebase you can inspect or self-host

Tradeoffs

  • Usage limits apply on free or starter tiers
  • Self-hosting requires managing your own keys and runtime

Tags & capabilities

EdgeDurable ObjectsMCP

Compare with alternatives

ToolPricingOpen sourceType
Cloudflare Agents SDK (this dossier)FreemiumYesInfrastructure
E2BFreemiumYesInfrastructure
RunloopPaidNoInfrastructure
Fly MachinesPaidNoInfrastructure
Beam CloudFreemiumNoInfrastructure

Questions

Is Cloudflare Agents SDK open source?

Yes. Cloudflare Agents SDK is open source and available on GitHub (https://github.com/cloudflare/agents).

What are the top alternatives to Cloudflare Agents SDK?

Top alternatives in Sandboxes & Code Execution include E2B, Runloop, Fly Machines, Beam Cloud.

Top Cloudflare Agents SDK alternatives

All Sandboxes & Code Execution
E2

E2B

e2b.dev

Open-source Firecracker microVM sandboxes built for running AI agent code safely

SandboxesFreemium
RU

Runloop

runloop.ai

Devbox infrastructure and benchmark environments purpose-built for coding agents

SandboxesPaid
FM

Fast-booting Firecracker microVMs via REST API for isolated per-session agent runtimes

SandboxesPaid