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.

  1. 08:00Your schedule“Research today's developments, save the report, and return the complete report with source links.”
  2. 14:00Its own wake-up“Add today's closing prices to /workspace/reports/2026-10-27.md.”
  3. 17:45Your app“Compare this week's prices with last month's reports.”
Tue Oct 27 · Chicago07:15AsleepNext 08:00 · your schedule
Asleep · set by youRunning · set by the agent

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.
run.camelai.com/console
Console
Agents

morning-brief

Asleepanthropic/claude-sonnet-5-5

ForkAbortDelete
ConversationRequestsTry itFilesConfigurationSchedules

Add a schedule

What should the agent do?

Research today's developments, save the report, and return the complete report with source links.

RepeatWeekdaysLocal time08:00Time zoneAmerica/Chicago

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.

Email the final report (optional)reader@example.comEmail subjectDaily research
Create schedule

Schedules

No schedules yet.

POST /v1/agents/{id}/schedules
JSON
{
  "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" }
}
Weekdays 08:00
Clocks go back Nov 1
Fri Oct 30Fri 30

08:0013:00 UTC

Sat Oct 31Sat 31

No run

Sun Nov 1Sun 1

Back an hour at 02:00

Mon Nov 2Mon 2

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.

Built-in tool
camelRun
schedule

Schedule a wake-up for yourself: at the time given, you receive text as a new message and can act on it.

Alsolist_schedulescancel_schedule
morning-brief · events
Tue Oct 27
  1. 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" }
  2. 08:34:02tool_execution_endschedule · isError: false
  3. 08:39:58agent_end
  4. Asleep from 08:40 to 14:00
  5. 14:00:00turn_openedindex: 18
  6. 14:00:00agent_start
  7. 14:00:00message_startuser · "Add today's closing prices to /workspace/…"
  8. 14:00:01turn_start
  9. 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.

morning-brief on camelRun
Your servers · built-in tools only
Your servers · your own toolsan HTTPS call when the agent needs a tool
nothing running

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.

Flask app · /hooks/agents
Python
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
POST /hooks/agents
your server
  1. 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}}}
  2. 14:15:40200run.completed
  3. 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.

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.

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.