camelRun by camelAI

Self-hosted AI agents

Deploy open-source camelRun v2 to your own Cloudflare account with Wrangler, or test it on your own machines with celld (experimental). Your Durable Objects, R2 repos, and secrets stay in your account, and the same v2 API runs on run.camelai.com.

~/run/v2
npx wrangler deploy -c worker/wrangler.pilot.jsonc

Same v2 API

The same AI agent code, hosted or self-hosted

Point CAMELRUN_BASE_URL at run.camelai.com or at your own Cloudflare Worker deployment. Every v2 REST, SSE, WebSocket, and MCP endpoint is identical, so nothing else in your agent code changes.

hello.py
import os, requests

BASE = os.environ.get("CAMELRUN_BASE_URL", "https://run.camelai.com")
HEADERS = {"Authorization": f"Bearer {os.environ['CAMELRUN_API_KEY']}"}

requests.put(
    f"{BASE}/v2/agents/hello",
    headers=HEADERS,
    json={"model": "openrouter/openai/gpt-6-luna", "instructions": "Be concise."},
)
run = requests.post(
    f"{BASE}/v2/agents/hello/runs",
    headers=HEADERS,
    json={"prompt": "Say hello in three languages.", "wait": True},
).json()
print(run["text"])
Your Cloudflare
export CAMELRUN_BASE_URL=https://agents.yourcompany.comexport CAMELRUN_API_KEY=cr_live_...
run.camelai.com
export CAMELRUN_API_KEY=cr_live_...
The quickstart runs on both

Deploy to your own Cloudflare

camelRun v2 runs on Cloudflare Workers, SQLite Durable Objects, R2, Queues, Containers, and Browser Rendering — with no Postgres and no servers to babysit. Deploy your own copy with Wrangler, or test running the same code on your own machines with celld (experimental).

Workers + DOsv2/worker · SQLite DOState + RunsR2 · Queues · Containers
Your Cloudflare account
~
git clone https://github.com/qaml-ai/run
cd run/v2 && npm ci
# edit account_id, routes, and Worker secrets (ADMIN_SECRET, VAULT_SECRET, TOOL_IDENTITY_PRIVATE_JWK)
npx wrangler deploy -c codemode-sandbox/wrangler.jsonc
npx wrangler deploy -c svg-renderer/wrangler.jsonc
npx wrangler deploy -c worker/wrangler.pilot.jsonc
curl -s https://agents.yourcompany.com/v2/health
{"ok":true,"service":"camelrun-worker-v2"}
Cloudflare
Workers plan with SQLite Durable Objects, R2, Queues, Containers, Browser Rendering, and Images.
Build tools
Node 22+, Go 1.24+, and Wrangler. Update account_id, routes, and Worker secrets for your account.
Provider keys
PUT /v2/providers/:providerStore keys per tenant over the v2 API (sealed with your VAULT_SECRET), or as Worker secrets.
Own machines
Run the same Durable Objects, R2, Queues, and Containers stack outside Cloudflare with celld (experimental).

Your account boundary

Keep agent state and secrets in your own account

Your Durable Objects, R2 repositories, VAULT_SECRET, and Ed25519 tool-signing key stay inside your Cloudflare account. Outbound MCP and webhook tool calls go through camelRun's SSRF guard and never follow redirects to private addresses.

Users reach your app, and your app calls your deployed camelRun v2 Worker at agents.yourcompany.com, where agent hello runs. The Worker stores history and camelFS repos in your Cloudflare SQLite Durable Objects and R2 buckets, signs remote MCP calls with your Ed25519 key, calls model providers over HTTPS, and blocks outbound calls to private IP ranges.
wrangler secrets
ADMIN_SECRET=<operator-bootstrap-key>
VAULT_SECRET=<seals-tenant-provider-keys>
TOOL_IDENTITY_ISSUER=https://agents.yourcompany.com/v2
TOOL_IDENTITY_PRIVATE_JWK=<ed25519-private-jwk>

Data portability

Read out agent history and files over v2 REST

State in camelRun v2 lives in per-agent SQLite Durable Objects and versioned camelFS repositories in R2. There is no single-click account ZIP export yet, so you can inspect and copy any agent's config, paged conversation history, and camelFS files directly through the v2 REST API.

Data and portability docs
v2 REST · per-agent reads
Read from sourceWrite to target
  • GET /v2/agents/:key
  • GET /v2/agents/:key/history
  • GET /v2/repos/:id/files
~
curl -sf "https://run.camelai.com/v2/agents/hello/history?after=0&limit=50" -H "Authorization: Bearer $CAMELRUN_API_KEY"

An open source AI agent platform you can read, run and fork

The v2 runtime and its console are AGPL-3.0. The SDKs, plugins, and examples are MIT, so they go in any app. If the AGPL doesn't work for your organization, camelAI offers the runtime under a commercial license too.

github.com/qaml-ai/runStar on GitHub
The runtimeAGPL-3.0
  • v2/worker/API Worker, SQLite Durable Objects and R2
  • v2/codemode-sandbox/QuickJS codemode Worker
  • v2/ingress/Edge router and console ingress
  • console/The web console
Use it anywhereMIT
  • sdk/TypeScript client SDK
  • plugins/Agent plugins
  • examples/Runnable examples

Questions about self-hosted AI agents

Deploy your own copy

Can I self-host an AI agent platform?

Yes. Deploy the AGPL-3.0 runtime from qaml-ai/run to your Cloudflare account with Wrangler, or try the experimental celld stack on your own machines.

Where does my agents' data live when I self-host?

Agents' history and files stay in your Cloudflare account, in SQLite Durable Objects and versioned camelFS repos in R2. Your VAULT_SECRET seals provider keys, and model calls go to the configured providers over HTTPS.

Is camelRun open source?

Yes. The runtime is AGPL-3.0-only, with MIT SDKs, plugins, and examples. Commercial licensing is available through camelai.com. Hosted pricing is $0.05 per active agent-hour and $0.18/hr for active Linux containers ($0.00005/sec), with free pre-warming. Idle time and storage cost $0.

What do I need to run camelRun myself?

You need Workers, SQLite Durable Objects, R2, Queues, Containers, Browser Rendering, and Images in your Cloudflare account, plus Node 22+, Go 1.24+, Wrangler, and model keys. Set your account ID, routes, and secrets in the v2/ Wrangler configs.

How do I upgrade a self-hosted camelRun?

Pull the latest qaml-ai/run commit and run npx wrangler deploy. SQLite migrations apply automatically, checkpoints survive deploys, and the rollout gives runs in progress time to finish.

Do I have to manage Postgres or multi-node clusters?

Cloudflare scales keyed agents across SQLite Durable Objects, with R2 for camelFS repos and Queues for webhook delivery. There's no Postgres server, Docker cluster, or manual sharding to manage.
Hosted and self-hosted

Is the self-hosted API the same as the hosted one?

Yes. Both serve the same v2 REST, SSE, WebSocket, and MCP routes. Set CAMELRUN_BASE_URL to your Worker hostname and use a tenant key created via POST /v2/tenants with your ADMIN_SECRET.

Can I move my agents between run.camelai.com and my own deployment?

Use the v2 API to read agent configs with GET /v2/agents/:key, page through history with GET /v2/agents/:key/history, and read or write workspace files through /v2/repos/:repoId.

Start hosted or in your own cloud

Get an API key and run on run.camelai.com at $0.05 per active agent-hour ($0 while idle), or clone qaml-ai/run and deploy camelRun v2 to your own Cloudflare account with Wrangler.