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 for schedulesnone
Your toolslist_todos
The agent is asleep.

An AI agent for every user. Your tools stay in your Worker.

camelRun by camelAI is a hosted runtime for AI agents. As with a Durable Object, the same name always reaches the same agent. camelRun runs its loop and keeps its history, files and schedules, and your Cloudflare Worker serves its 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

Your Worker serves every user's tools from one route, and each call arrives signed with the user it's for. Make the agents from any backend: in TypeScript on Workers, or in Python.

@camelai/run runs onCloudflare Workers/Node/Bun/Deno
route todos.example.com/mcp*
import { serveTools } from "@camelai/run/server";
import { tool, schema } from "@camelai/run";

// The application's data: every to-do belongs to one person on one team.
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 },
];

const tools = {
  list_todos: tool({
    description: "The current user's to-dos on their team",
    input: schema.Object({}, { additionalProperties: false }),
    // Who is asking comes from the runtime's signed token, never from the model's arguments.
    execute: (_args, { identity }) => todos.filter(todo => todo.owner === identity!.user && todo.team === identity!.context.team),
  }),
};

// A fetch handler: Cloudflare Workers, Bun and Deno serve it as is.
export default { fetch: serveTools(tools, { runtime: "https://run.camelai.com", tenant: "acme" }) };
Result fortodos-alice
  1. tool_execution_start
  2. tool_execution_end

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

01
Your chat route
createAgentHandler is a standard fetch handler, so your app's Worker can serve each user's chat at /api/agent. Return the agent's key from authorize, and the chat reaches the same todos-alice.
app.post("/api/agent", c => handler(c.req.raw));
02
Your MCP server
Built with Cloudflare's createMcpHandler? Check camelRun's signed token with runtimeAuth and keep the server where it is.
runtimeAuth(request, { runtime, tenant })
03
Your agent's reminders
Give the definition the schedule built-in, and each user's agent sets its own wake-ups, the way alarms wake a Durable Object.
04
Your AI Gateway
Send each customer's model calls through your Cloudflare AI Gateway, on their own provider key.

Agents SDK to camelRun

How Cloudflare Agents SDK ideas map to camelRun

If you know the Agents SDK, you already know camelRun's shape. Each idea has a place in it, and camelRun runs that part for you.

  1. 01 / 06
    Agents SDK

    Same name, same agent

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

    camelRun

    Same key, same agent

    Upsert an agent by your own key. The same key is the same agent, from any process, until you delete it.

  2. 02 / 06
    Agents SDK

    State in SQLite

    Each agent keeps its state in its own SQLite database and syncs it to connected clients.

    camelRun

    History and files

    Every message stays in the agent's history, and its files live in a workspace your code can read.

  3. 03 / 06
    Agents SDK

    Scheduled tasks

    Schedule a task for later or on repeat, and an alarm wakes the agent to run it.

    camelRun

    Schedules

    Wake an agent later or every few minutes from your code, or let the agent set its own reminders.

  4. 04 / 06
    Agents SDK

    Hibernation

    An idle Durable Object can hibernate, and isn't billed for duration while it does.

    camelRun

    Asleep until a message

    Most agents are asleep at any moment, and a message wakes one.

  5. 05 / 06
    Agents SDK

    Chat over WebSockets

    Clients connect over WebSockets and get messages from the agent in real time.

    camelRun

    Streaming chat

    Replies stream into your app as they're written, and a dropped stream picks up after its last event.

  6. 06 / 06
    Agents SDK

    Durable execution

    Wrap long work in a fiber, checkpoint as it goes, and recover it when the object starts again.

    camelRun

    Turns that carry on

    A deploy never cuts a step short: the turn moves to another server and carries on. A tool call is never sent twice.

Our Cloudflare story

We built on Cloudflare first

Our coding agent ran in Durable Objects before camelRun existed. What we built to keep its turns going became the runtime.

  1. Jul 2026

    Our agent moves into Durable Objects

    We took our coding agent off VMs and gave each chat thread its own Durable Object. It got cheaper and faster, and its long turns learned to pick up again after a restart.

  2. Sep 2026

    We build camelRun

    We built camelRun so a turn carries on through a deploy with nothing to write. camelCode and camelBot run on it now.

  3. Today

    Your agents can run on it too

    From a Cloudflare Worker or any other backend.

“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

Your app lives on Cloudflare, and you want the agent's class, loop, state and WebSockets in a Durable Object you deploy and run.

Lifted into camelRun

Pick camelRun

You want each agent's loop, history, files and schedules run for you, with Slack, Discord, Telegram and GitHub built in, while your Worker keeps the tools.

What Cloudflare developers ask about camelRun

  1. What is Cloudflare Agents SDK?

    Cloudflare's Agents SDK is an open source TypeScript library (the agents package on npm) for building AI agents on Durable Objects. The same name always reaches the same agent, with its own SQLite storage, WebSocket connections and scheduled tasks, running on Cloudflare.

  2. What does agent sdk do?

    An agent SDK gives your code an AI agent's parts: a loop that calls a model and tools, and memory between messages. Cloudflare's Agents SDK runs that loop in your Durable Objects. With camelRun, the runtime runs it and calls the tools in your code.

  3. Can I use camelRun from Cloudflare Workers?

    Yes. The TypeScript SDK runs on Cloudflare Workers, as well as Node, Bun and Deno. A Worker can make and run agents, serve their tools with serveTools, and serve each user's chat with createAgentHandler, since both are standard fetch handlers.

  4. Is camelRun a Durable Objects alternative?

    For AI agents, yes. As with a Durable Object, the same key always reaches the same agent, from any process. Its history and files live in camelRun, and it sleeps until a message, schedule or channel wakes it. Your Worker serves its tools.

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

    Your deploys leave it alone: the agent runs in camelRun, and tools your Worker serves over HTTP are safe through your deploys.

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

    camelRun is prepaid: $0.01 for each hour an agent spends in a run and $0.10 per GB-month of storage. Tokens on your own provider keys cost nothing extra; on ours, it's the provider's price, no markup on tokens. Idle and sleeping agents cost only storage.

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.

Bring the agent-per-name idea you know from Durable Objects. camelRun runs every agent, and your Worker keeps its tools.

Set up with your coding agent

Read https://run.camelai.com/SKILL.md and set up camelRun in this project. Ask me what the agent should do.

Paste into Claude Code, Codex, Cursor or any coding agent. It asks what your agent should do, then builds it.

Keep reading