camelAI Documentation

Start Here

camelRun v2: durable AI agent runtime and CamelFS

camelRun v2 hosts durable keyed AI agents on Cloudflare Durable Objects with CamelFS git-backed repositories, session VMs, MCP tools, and streaming.

View as Markdown

camelRun v2 is camelAI's durable AI agent runtime served at https://run.camelai.com/v2. You define an agent by key, give it instructions, built-in suites, MCP servers, HTTP webhook tools, or local tools served over a hibernatable WebSocket. camelRun runs the model loop, stores conversation history and Git-backed workspace files in CamelFS, compacts long contexts, executes bash inside persistent session VMs, and wakes agents on schedules or inbound channels.

Upgrading from camelRun v1? camelRun v2 replaces /v1/* with /v2/*, replaces mutable volumes and mounts with CamelFS git-backed repositories (/v2/repos), and moves end-user credit enforcement to your application with per-run and per-agent spendLimitUsd. See Migrating from v1 to v2.

TypeScript
import { CamelRun, defineTool } from "@camelai/run";

const client = new CamelRun({
  baseUrl: "https://run.camelai.com",
  apiKey: process.env.CAMELRUN_API_KEY!,
});

const lookupOrder = defineTool({
  name: "lookupOrder",
  description: "Look up an order by ID",
  parameters: {
    type: "object",
    properties: { orderId: { type: "string" } },
    required: ["orderId"],
  },
  execute: ({ orderId }) => ({ orderId, status: "shipped" }),
});

const agent = await client.agents.upsert("support-triage", {
  instructions: "Be concise.",
  tools: [lookupOrder],
});

const run = await agent.run("What is the status of order ORD-42?");
console.log(run.text);
client.close();
API basehttps://run.camelai.com/v2
Health checkGET /v2/health
JWKS (runtime tool auth)GET /v2/.well-known/jwks.json
TypeScript SDK@camelai/run (2.0.0, zero dependencies)

What you get

Start here