Agent automations: schedules, webhooks and runs

An automation is a standing instruction for an agent: a prompt, plus a rule for when to run it. Use one when the same kind of work comes up again and again: check every new bug report, write release notes every Friday, review the dependencies every night.

This page assumes you already have an agent on a connected computer. If not, start with AI agents on your own machine.

Create an automation

Open the agent, go to the Automations tab and select New automation. The fields that matter most:

  • Type: Schedule (runs at the times you choose) or Webhook (a request to the automation's own URL starts a run).
  • Name: something your team will recognize in the run history, such as "Triage failing builds".
  • Repositories: which of the agent's repositories the run works in. None selected means the whole agent folder; one selected means the run starts inside that repository.
  • Permissions: Read-only or Edit, never above the agent's highest mode.
  • Memory: Off, Read or Read and write, whether runs see and may update the agent's notes.
  • Prompt: the instruction itself. Write it the way you would brief a colleague: the goal, where to look, what a good result looks like and what not to touch.

A good prompt is concrete:

A build failed. The webhook body has the build log. Find the cause in the repository. If it is a small, clear fix, make it on a new branch and push it. Otherwise explain the cause and the files involved. Do not change the CI configuration.

Select Create automation. The switch on the automation turns it on and off without deleting it.

Schedule

A schedule automation starts a run at the times you choose, with no request from anywhere. Pick a preset (Daily at 9:00, Weekdays at 9:00, Mondays at 9:00) or write your own five-field cron expression (minute, hour, day, month, weekday), and choose the Time zone. Runs must be at least five minutes apart.

To try a schedule automation without waiting, open its menu and choose Run now.

Webhook

A webhook automation gets its own URL. Anything that can send an HTTP request can start it: your CI, an issue tracker, a monitoring tool or a script. The request body is passed to the run, so the prompt can refer to it ("the webhook body has the build log").

When you create a webhook automation, Mercur shows its URL once, with a ready-made curl command to try it:

Start a run
curl -X POST '<your webhook URL>' \
-H 'Content-Type: application/json' \
-d '{"build": "1432", "status": "failed"}'

Treat the URL like a password: anyone who has it can start runs. If it leaks, choose Rotate URL secret in the automation's menu; the old URL stops working at once.

Two optional settings help with real-world senders:

  • Deduplication ignores repeated deliveries of the same event, by a request header or a value in the body, within a time window. Useful when a sender retries.
  • Inbound verification checks the sender's HMAC signature with a secret you share with it, and answers the setup handshake some services send first.

Run later

A webhook can ask for its run to start later instead of now. Add runAt to the URL with a date and time in ISO 8601 format, with a time zone offset or Z, up to 30 days ahead:

Run at 9:00 tomorrow
curl -X POST '<your webhook URL>?runAt=2026-11-19T09:00:00+02:00' \
-H 'Content-Type: application/json' -d '{}'

The run waits in the agent's Queue tab until its time, and you can cancel it there.

Send the result somewhere

Turn on Callback to have Mercur POST the result of each run to an HTTPS URL of your own, for example to post it into another system. Callbacks are signed with the automation's callback key (Show callback key in its menu) so your service can check they came from Mercur.

To post results into Slack instead, connect a Slack bot and let automations write to it: see Put an agent in Slack.

Read the run history

Every run is listed on the agent's Runs tab with what started it (Schedule, Webhook, Manual or MCP) and who, when it ran, how long it took and what it cost. Open a run to see its result, its error if it failed, and the events along the way, including any branch it pushed.

StatusWhat it means
ScheduledWaiting for its start time (a run asked for later).
QueuedWaiting for the agent to have a free slot, or for its computer to come online.
RunningThe agent is working on it. You can cancel it from the run.
Succeeded / FailedFinished. A failed run shows its error.
CancelledSomeone stopped it.
ExpiredIt waited in the queue longer than the automation's queue time limit, usually because the computer was offline.
DeduplicatedA repeated delivery that deduplication ignored.
Skipped / Rejected / Ignored

It did not run: the previous run had not finished, the queue was full, or the automation was turned off. The run shows the reason.

Start runs from Claude

You can also create webhook and schedule automations, start them and read the run history by asking Claude, once the agent is connected to it: see Use an agent from Claude (MCP).