Temporal alternative for AI agents
camelRun by camelAI runs the agent loop for you. No workflow or worker to write, and your AI agent picks up where it left off after a crash.camelRun by camelAI runs the agent loop for you. There is no workflow, activity or worker to write, and your AI agent still picks up where it left off after a crash.
One turn of a research agent shown twice. On Temporal you write the workflow and its activities and run the workers; when a worker is lost, the page fetch activity times out and retries, and another worker replays your workflow from history. On camelRun your code makes one call; when a server is lost, the turn resumes on another server, the page fetch whose answer was lost is marked outcome unknown, and the model calls web_fetch again. Both answer the question.
The whole agent
Durable AI agents with no workflow code
This file is research-agent, all of it. camelRun runs its loop, answers web_search and web_fetch itself, and records each step as it goes. Stop your process mid-answer and the run still finishes in camelRun, with the answer kept in the agent's history.
import { Agents } from "@camelai/run";
const agents = new Agents( );
// Built-in tools the runtime answers itself: web search and page reading.
const agent = await agents .upsert( "research-agent", {
model: "openrouter/ openai/ gpt-6-luna",
instructions: "You are a careful researcher. Search the web, read the best sources with web_fetch, " +
"then answer in a few short paragraphs. Cite every claim with a numbered [n] and list the URLs under Sources.",
builtins: ["web_search", "web_fetch"],
});
const question = process .argv .slice( 2) .join( " ") || "What changed in the most recent Node.js LTS release?";
for await ( const part of agent .stream( question)) {
if ( part .type === "text") process .stdout .write( part .text);
if ( part .type === "tool_call") console .log( `→ ${part .name}( ${JSON .stringify( part .arguments)})`);
}
console .log( );
await agents .close( );{
"name": "research-agent",
"private": true,
"type": "module",
"scripts": { "start": "tsx index.ts" },
"dependencies": { "@camelai/run": "^0.11.0" },
"devDependencies": { "tsx": "^4.20.0" }
}npm install
export CAMELAI_ API_ KEY= art_ ...
npm start -- "What changed in the most recent Node.js LTS release?"→ web_search({"query":"site:nodejs.org/en/blog/release most recent Node.js LTS release"})
→ web_fetch({"url":"https://nodejs.org/en/blog/release/v24.21.0"})
The latest Node.js LTS release is 24.21.0 ("Krypton"), released September 8. [1]
…
Sources
[1] https://nodejs.org/en/blog/release/v24.21.0Temporal to camelRun
What replaces Temporal workflows, activities and workers
Each piece you build to run an agent on Temporal has a part of camelRun that does the same job. Your tools stay in your code, and the runtime keeps the rest.
- Workflow
- On Temporal: Your agent loop, kept deterministic so Temporal can replay it after a failure.
- On camelRun: An agent you upsert by its key. camelRun keeps its history, files and pending work.
- Activities for model calls
- On Temporal: Each model call in an activity, retried with backoff by default or under a policy you tune.
- On camelRun: Model calls retried inside the turn by the runtime.
- Activities for tools
- On Temporal: Each tool call in an activity too, kept idempotent since it can run more than once.
- On camelRun: Tools as ordinary functions. A lost answer comes back to the model as outcome unknown.
- Workers
- On Temporal: Processes you deploy and scale to run your workflows and activities.
- On camelRun: Nothing to deploy for the agent loop: camelRun runs it. Your app serves only your own tools, and research-agent has none: its two built-ins run in camelRun.
- Signals
- On Temporal: Messages a workflow waits on, such as a person saying yes.
- On camelRun: Approvals and questions. The agent sleeps with no agent time billed until someone answers, minutes or days later.
- Timers and schedules
- On Temporal: Durable sleeps inside a workflow, and schedules that start workflows later.
- On camelRun: Schedules that wake the agent with a message, set by your code or by the agent.
- Child workflows
- On Temporal: Workflows a parent workflow starts and waits on.
- On camelRun: Sub-agents, each an agent of its own. A parent that loses its server still collects the answer.
Already on Temporal
Call a camelRun agent from your Temporal workflow
Keep Temporal for the business processes it already runs, and give the agent step to camelRun. Call research-agent from an activity, with an idempotencyKey made from the workflow's run ID and the activity's ID. When the activity retries, it collects the run it already started.
- Temporal fits when
- you orchestrate long business processes across many services and want to write every step as code.
- camelRun fits when
- you want an AI agent for each user, thread or job, with its history, files, schedules and channels kept for you.
Questions
Temporal and camelRun for AI agents, answered
What is a temporal AI agent?
An AI agent built on Temporal, the open source durable execution platform. The agent loop runs as a workflow and its model and tool calls run as activities on workers you operate. Temporal records each step, so another worker can replay the workflow after a failure. It has integrations for the OpenAI Agents SDK, Pydantic AI, Google ADK and more.
Do I need to write workflows or activities to use camelRun?
No. A durable AI agent on camelRun is a key, a model, instructions and tools. You call
run()orstream(), and camelRun runs the loop and answers built-in tools such asweb_searchitself. Your own tools are plain functions in your code.What happens to a tool call when a server crashes mid-turn?
The turn resumes on another server (
turn_resumed). A tool call whose answer was lost is never sent again: the model is told its outcome is unknown, so it can check before repeating anything. Key side effects bycontext.idempotencyKey, which stays the same for that call.How do retries work for model calls on camelRun?
When a provider is overloaded, rate limits you, returns a server error or drops the stream, camelRun tries the call again within the turn, backing off between attempts. A stalled stream is ended and retried too, and a failed response that was retried is taken out of the agent's history.
Can I call a camelRun agent from a Temporal workflow?
Yes. Call it from an activity and pass the workflow run ID plus the activity ID as the run's
idempotencyKey. A retried activity gets the same run back, or its result if it has ended, so the agent handles the request once.How does camelRun's pricing compare with Temporal Cloud?
Temporal Cloud bills per action: $50 per million on pay-as-you-go, falling to $25 with volume, and your workers run on compute you pay for. camelRun bills $0.01 per agent-hour while an agent is in a run and $0.10 per GB-month of storage, with $0 for tokens on your own provider keys. Idle and sleeping agents cost only storage.
Is camelRun open source like Temporal?
Yes. The runtime is AGPL and its SDKs are MIT, so you can read the code and run it on your own servers with Docker and Postgres. Temporal's server is open source too, under MIT.
asked · What changed in the most recent Node.js LTS release?answered · [1] https://nodejs.org/en/blog/release/v24.21.0
Get started
Start an AI agent without a workflow
Get an API key, copy research-agent and run it with npm start. Or hand the setup to 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.