Compare · camelRun by camelAI

Cloudflare Agents alternative

todos-aliceasleep
Your Durable Object runs all four
Your Workertodos.example.com
Your agent and its loopasleep
Its state, in SQLitechat history, state
Alarms and recoverynone
Your toolslist_todos
The agent is asleep.

Built on Cloudflare Durable Objects. Operated as a runtime.

camelRun by camelAI actually runs on Cloudflare Workers, SQLite Durable Objects, R2, Cloudflare Containers, and Browser Rendering. Instead of building and operating the agent loop, compaction, versioned camelFS, containers, and recovery yourself on the Agents SDK, use camelRun managed or self-host the AGPL-3.0 runtime in your own Cloudflare account while your Worker keeps the tools.

Show
Todos· team acmetodos.example.com
  • Draft the Q4 roadmapalice
  • Fix the flaky billing testbob
  1. AliceWhat's left for this week?
  2. Agentasleep
Your loop
  1. Alice's message
  2. model call
  3. list_todos
  4. model call
  5. reply

Cloudflare Workers

Serve AI agent tools from Cloudflare Workers

Call /v2/agents/:key/runs from your Worker over HTTPS, and keep your tools in your Worker behind runtime-authenticated MCP or async 202 webhooks.

Plain HTTPS /v2 fromCloudflare Workers/Node/Bun/Deno/Python
route todos.example.com/mcp · Ed25519 JWT + async 202
// Cloudflare Worker: runtime-auth MCP (/mcp) + async 202 webhook (/tools/export).
import { createRemoteJWKSet, jwtVerify } from "jose";

const JWKS = createRemoteJWKSet(
  new URL("https://run.camelai.com/v2/.well-known/jwks.json"),
);

const todos = [
  { id: "t1", owner: "alice", team: "acme", text: "Draft the Q4 roadmap", done: false },
  { id: "t2", owner: "bob", team: "acme", text: "Fix the flaky billing test", done: false },
  { id: "t3", owner: "alice", team: "globex", text: "Another team's to-do", done: false },
];

export default {
  async fetch(req: Request, env: Env, ctx: ExecutionContext) {
    const { pathname } = new URL(req.url);
    if (pathname === "/mcp") {
      const jwt = req.headers.get("authorization")?.slice(7) ?? "";
      const { payload } = await jwtVerify(jwt, JWKS); // Ed25519: sub + act
      const actor = String(payload.act ?? payload.sub);
      return handleMcp(req, () => todos.filter((t) => t.owner === actor && t.team === "acme"));
    }
    if (pathname === "/tools/export" && req.headers.get("x-tool-secret") === env.TOOL_SECRET) {
      const { args, callback } = await req.json<any>(); // X-CamelRun-Agent + X-CamelRun-Run
      ctx.waitUntil(runExportAndPostCallback(args, callback));
      return new Response(null, { status: 202 });
    }
    return new Response("Not found", { status: 404 });
  },
};
Result fortodos-alice
  1. tool_call_start
  2. tool_call_end

[{"id":"t1","owner":"alice","team":"acme","text":"Draft the Q4 roadmap","done":false}]

01
Scoped browser streaming
Upsert the user's agent from your Worker, hand the browser its scoped agt_tok_ token, and stream GET /v2/agents/todos-alice/events?after=0 directly over SSE.
GET /v2/agents/todos-alice/events?after=0
02
Runtime-auth MCP and async 202 webhooks
Remote MCP servers with auth: { type: "runtime" } receive short-lived Ed25519 JWTs (sub and act). Webhook tools get X-CamelRun-Agent, X-CamelRun-Run, your configured headers, and signed callback tokens on 202.
auth: { type: "runtime" } // JWKS: /v2/.well-known/jwks.json
03
Schedules, camelFS, and Browser Rendering
Turn on cron schedules, versioned camelFS repos, Linux container bash, QuickJS codemode, and headless Browser Rendering without maintaining Cloudflare bindings or warm pools yourself.
04
Your provider keys and AI Gateway
Save your provider keys with PUT /v2/providers/:provider and an optional baseUrl to route through Cloudflare AI Gateway, with $0 token charges from camelRun on BYOK.

Agents SDK to camelRun

How Cloudflare Agents SDK ideas map to camelRun

Both run on Cloudflare Durable Objects. The difference is whether your team builds and operates the agent harness, compaction, versioned camelFS, container lifecycle, and recovery—or hands them to camelRun.

  1. 01 / 06
    Agents SDK

    Same name, same agent

    Address an agent by name, such as a user ID, and you always reach the same Durable Object.

    camelRun

    Same key, same AgentDO

    Upsert an agent by key over HTTPS. camelRun v2 routes it to its own SQLite Durable Object (AgentDO) from any backend.

  2. 02 / 06
    Agents SDK

    State in SQLite

    Each agent keeps its state in embedded SQLite, and you wire compaction, file storage, and memory yourself.

    camelRun

    History, camelFS, and dreaming

    Conversation history lives in SQLite, files live in versioned camelFS (DO + R2) with instant atSeq forks, and idle dreaming writes MEMORY.md.

  3. 03 / 06
    Agents SDK

    Wire Containers and browsers

    Bind Cloudflare Containers and Browser Rendering manually, manage warm pools, and track per-container lifecycle.

    camelRun

    Linux bash, QuickJS, and Browser Rendering

    Enable builtins for a pre-warmed Cloudflare Container (bash with Node 24, Python 3, git, ripgrep), QuickJS codemode, and headless Browser Rendering.

  4. 04 / 06
    Agents SDK

    Hibernation

    An idle Durable Object hibernates and is not billed for duration while asleep.

    camelRun

    Asleep or parked at $0

    Sleeping, queued, and parked agents (including runs awaiting async 202 webhook callbacks or approvals) cost $0.

  5. 05 / 06
    Agents SDK

    Chat over WebSockets

    Manage WebSocket auth, event persistence, and reconnect cursors inside your Durable Object.

    camelRun

    SSE, WebSockets, and scoped tokens

    Stream events over SSE (events?after=0) or hibernatable WebSockets using a per-agent agt_tok_ token, resuming cleanly after disconnects.

  6. 06 / 06
    Agents SDK

    Durable execution

    Write checkpointing, restart recovery, and step replay logic inside your own agent harness.

    camelRun

    Recovery and deterministic replay

    AgentDO saves conversation boundaries in SQLite to resume after restarts, and built-in workflows replay completed steps from step_cache.

Our Cloudflare story

We built on Cloudflare first

Our coding agent started in Durable Objects, taught us what a durable agent runtime needs, and brought camelRun v2 back to run natively on Cloudflare.

  1. Jul 2026

    Our first agent moves to Durable Objects

    We took our coding agent off VMs and gave each chat thread its own Cloudflare Durable Object. It got cheaper and faster, and taught us what long-running agents need to survive restarts.

  2. Sep 2026

    v1 tests a standalone runtime

    In September we built camelRun v1 off Cloudflare to work out durable agent harnesses, compaction, and debugging for camelCode and camelBot (documented in our September post below).

  3. v2 · Today

    camelRun v2 returns to Cloudflare

    We rebuilt camelRun v2 natively on Cloudflare Workers, SQLite Durable Objects, R2, Queues, Containers, and Browser Rendering, and open-sourced it under AGPL-3.0 so you can use ours or deploy to your own Cloudflare account.

“I'd still start almost any project on Cloudflare Workers, because they're the fastest way I know to ship something.”
Illiana Reed, CEO of camelAI
The whole story

Agents SDK or camelRun for your Workers app

In your Durable Object

Pick the Agents SDK

You want to write and operate the agent class, compaction, file storage, container wiring, and restart recovery yourself inside your own Cloudflare Durable Objects.

Lifted into camelRun

Pick camelRun

You want the agent harness, compaction, versioned camelFS, pre-warmed Linux containers, Browser Rendering, and recovery operated for you on Cloudflare (or self-hosted under AGPL-3.0) while your Worker keeps the tools.

What Cloudflare developers ask about camelRun

  1. What is Cloudflare Agents SDK?

    Cloudflare's open-source TypeScript SDK builds AI agents on Durable Objects in your account, with SQLite storage, WebSockets, and scheduled alarms.

  2. How is camelRun different if it also runs on Cloudflare?

    Cloudflare's SDK provides primitives for building an agent runtime. camelRun v2 runs the loop, compaction, file storage, and recovery on Cloudflare and serves a hosted HTTPS API.

  3. Can I use camelRun from Cloudflare Workers?

    Yes. Call /v2 with fetch. Issue a scoped agt_tok_ token to serve each user's chat over SSE. Keep tools in your Worker behind runtime-authenticated MCP or async 202 webhooks.

  4. Can I deploy camelRun into my own Cloudflare account?

    Yes. Deploy the AGPL-3.0 runtime from qaml-ai/run into your Cloudflare account with Wrangler, or try experimental self-hosting with celld.

  5. What happens to a running agent when I deploy my Worker?

    Your deploys leave it alone. The agent runs in camelRun while your Worker serves tools. Long-running webhooks can return 202 Accepted and POST back with a signed callback token.

  6. What does an AI agent per user cost on camelRun?

    camelRun is prepaid: $0.05 per active agent-hour, $0 while idle, queued, or parked, and $0.00005 per second ($0.18/hr) for active Linux container bash with free pre-warming. camelFS and history storage are $0 right now; model tokens are $0 from camelRun on BYOK or pass-through on direct providers.

Give each user an AI agent

todos-alicewoken by its schedule
  1. ScheduleFriday morning check-in
  2. AgentMorning, Alice. The Q4 roadmap is still open.

Keep the agent-per-name model you know from Durable Objects without operating the loop, versioned camelFS, or containers yourself. Your Worker keeps its tools.

Connect your coding agent (no key)

claude mcp add --transport http camelrun https://run.camelai.com/mcp

Adds camelRun's hosted MCP server to Claude Code (also works with Codex and ChatGPT). Signing in creates your account automatically.