camelRun by camelAI · Background agents
Background AI agents that run on a schedule
camelRun wakes your AI agent on your schedule, on wake-ups it sets itself, or when your code calls. It sleeps in between.Give an AI agent a job and a time. camelRun wakes it on your schedule, on wake-ups it sets for itself, or when your code sends a message, and it sleeps in between.
- 08:00Your schedule“Research today's developments, save the report, and return the complete report with source links.”
- 14:00Its own wake-up“Add today's closing prices to /workspace/reports/2026-10-27.md.”
- 17:45Your app“Compare this week's prices with last month's reports.”
Scheduled AI agents
Schedule an AI agent from the console or your code
Pick daily or weekdays, a local time and a time zone. The console's Schedules tab is an AI agent scheduler, and the API takes the same settings. A schedule can also send the run's final report to your own inbox.
- Daily or weekdays at a local time, once at a set time, or on repeat at an interval.
- Set it from the TypeScript or Python SDK, the API, the console, or your coding agent through camelRun's MCP server.
morning-brief
Asleepanthropic/claude-sonnet-5-5
Add a schedule
What should the agent do?
Research today's developments, save the report, and return the complete report with source links.
Uses this local time through daylight saving changes. Each run starts with your prompt and the agent’s instructions, and can read its saved files.
Schedules
No schedules yet.
{
"text": "Research today's developments, save the report, and return the complete report with source links. ",
"history": "none",
"calendar": {
"time": "08:00",
"timeZone": "America/Chicago",
"daysOfWeek": [1, 2, 3, 4, 5]
},
"email": { "to": "reader@example.com", "subject": "Daily research", "format": "markdown" }
}08:0013:00 UTC
No run
Back an hour at 02:00
08:0014:00 UTC
The schedule built-in
AI agents that wake themselves
Give an agent the schedule built-in and it decides when to look again. At that time it gets the message it wrote itself, with its history and files, and picks the job back up. It can list and cancel its own wake-ups too.
Schedule a wake-up for yourself: at the time given, you receive text as a new message and can act on it.
- 08:34:02tool_execution_startschedule{ "text": "Add today's closing prices to /workspace/reports/2026-10-27.md.","at": "2026-10-27T14:00:00-05:00" }
- 08:34:02tool_execution_endschedule · isError: false
- 08:39:58agent_end
- Asleep from 08:40 to 14:00
- 14:00:00turn_openedindex: 18
- 14:00:00agent_start
- 14:00:00message_startuser · "Add today's closing prices to /workspace/…"
- 14:00:01turn_start
- 14:00:03tool_execution_startread /workspace/reports/2026-10-27.md
Nothing to keep running
Run background agents without keeping a server up
An agent that uses built-in tools, like web search and web fetch, needs nothing of yours running when it wakes. One that calls your own tools needs only an HTTPS endpoint, and the runtime calls it when the agent does.
Idle and sleeping agents cost only storage.
Long runs
Long-running AI agents that report back when they finish
Your app can start a run and stop waiting. The run itself goes on, and a webhook tells your server when it ends, with what it used. You register your endpoint once, with POST /v1/webhooks or the SDK.
from camelai_run import WebhookVerificationError, verify_webhook
@app.post("/hooks/agents") # Flask; in Django, request.body and request.headers
def hook():
try:
event = verify_webhook(request.get_data(), request.headers, os.environ["WEBHOOK_SECRET"])
except WebhookVerificationError:
return "", 400
queue.put(event)
return "", 200- 18:15:02200run.completed
{"id": "evt_…", "type": "run.completed", "created": 1793142902, "data": {"agentId": "client_…", "requestId": "…", "method": "prompt", "metadata": {"source": "app"}, "replyIndex": 31, "messageCount": 32, "usage": {"responses": 3, "input": 6800, "output": 1240, "cacheRead": 30400, "cacheWrite": 5200, "costUsd": 0.0676}}} - 14:15:40200run.completed
- 08:40:11200run.completed
FAQ
Questions about background AI agents
What is a background agent?
An AI agent that works without anyone waiting on it, such as the agents you build into your own product. It wakes on a schedule, on a wake-up it set for itself, or on a message from your code, does its job, and goes back to sleep. On camelRun it keeps its instructions, history and saved files from one wake-up to the next.
How do I run an AI agent on a schedule?
Open the agent in the console and select Schedules, call POST /v1/agents/{id}/schedules, or use agent.schedule() in the TypeScript or Python SDK. Choose daily or weekdays at a local time in an IANA time zone, a single wake-up, or a repeat at an interval.
Can an AI agent schedule its own tasks?
Yes. With the schedule built-in, the agent sets its own wake-ups: in an hour, at a set time, or on repeat. At that time it receives the message it wrote and carries on. It can also list and cancel the wake-ups it set.
Do I need a server running for a scheduled agent?
No, if it only uses built-in tools such as web_search and web_fetch: camelRun wakes it, and none of your code has to be online. If it calls your own tools, host them behind an HTTPS endpoint, which the runtime calls when the agent needs one.
What does a background agent cost while it sleeps?
Only its storage, $0.10 per GB-month for its history and files. Agent time is $0.01 per agent-hour, counted only while the agent is in a run. Tokens on your own provider keys cost nothing extra, and tokens on ours are the provider's price, no markup on tokens.
How do I know when a background run has finished?
Register a webhook for run.completed and run.failed, and your server hears each run end, with its usage. A schedule can also send the successful run's final reply to your own address.
Does a scheduled agent follow daylight saving time?
Yes. A calendar schedule keeps its local time in the time zone you pick, so an 08:00 run in Chicago still starts at 08:00 after the clocks change.
Can a background agent ask me before it acts?
Yes. A tool can need approval, or the agent can ask you a question, and the run waits for your answer for days if it has to, with nothing billed while it waits.
More on camelRun
- Human-in-the-loop AI agentsAgents that ask a person before a risky step: an approval, a question, a form or a page to visit. The agent sleeps while it waits, for days, then carries on from the same step.
- Multi-agent orchestrationAn AI agent fans out tasks to sub-agents that work in parallel or in the background, and every answer folds back into its reply.
- Durable AI agentsAgents whose history, files and unfinished work live in camelRun, so a turn carries on through deploys and crashes without sending a tool call twice.
- Telegram AI botPaste a BotFather token and every Telegram chat gets its own AI agent, with your tools, its own history, voice notes and photos.
- Temporal alternative for AI agentscamelRun next to Temporal for AI agents: no workflow, activities or workers to write. The runtime runs the loop, retries model calls and resumes a turn after a crash.
- AI agent memoryAgents that keep every message and the files they write. Long conversations are summarized for the model, and the history keeps them whole.
- camelRunCloud hosting for AI agents, from the first one to thousands at once
morning-brief · asleep · next wake-up Wed 08:00morning-brief · asleep · Wed 08:00
Schedule your first AI agent
Make an agent, give it a job and a time, and let it work while you're away.
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.