Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
---
title: Autopilots
description: Hand recurring work to agents automatically, on a schedule or from a webhook.
---
import { Callout } from "fumadocs-ui/components/callout";
import { AutopilotDemo } from "@/components/demos/autopilot-demo";
A daily progress summary, a periodic dependency check, an agent kicked off by an event from an external system: work that happens over and over goes to an autopilot.
Each autopilot stores a Runbook, an assignee, and one or more triggers. When triggered, Multica creates an issue or runs the agent directly, and every run leaves a record.
## Autopilots and issue wakeups [#vs-wakeups]
An autopilot starts new work from a schedule or webhook, and can create a new issue each time. To have an agent come back to one existing issue later, at a set time or once something happens on it, add a [wakeup](/issue-wakeups) to that issue instead. The **Issue wakeups** tab on the Autopilot page lists every wakeup in the workspace.
## Create an autopilot
Open **Auto** in the app rail, pick a template or start from scratch, then configure:
- **Name**: what this autopilot is responsible for;
- **Runbook**: the goal, background, constraints, and steps the agent reads on every run;
- **Assignee**: an agent or a squad;
- **Project**: optional; puts auto-created issues into a specific project;
- **Execution mode**: create an issue, or run only;
- **Subscribers**: members to notify after an issue is auto-created;
- **Triggers**: a schedule or a webhook.
An autopilot is enabled by default after saving. **Run now** executes the full flow once at any time, without waiting for the schedule.
The clip below opens a Create-issue autopilot (**Weekly dead-code audit**), triggers **Run now**, and follows the created run and linked issue in Run history.
<AutopilotDemo />
## Choose an execution mode
| Mode | Behavior | Best for |
|---|---|---|
| **Create issue** | Each trigger first creates an issue, then assigns it to the assignee; discussion, status, and run records all live on the issue. | Work the team needs to review, confirm, or follow up on. |
| **Run only** | Creates a run directly with no issue; results are visible only in the autopilot's run history. | Background runs that need no collaboration record. |
**Create issue** mode uses the same run queue as regular issues: when the runtime is offline, the issue is still created, and the run starts once the runtime comes online.
**Run only** requires the runtime to be available at trigger time; otherwise the run shows as skipped, and no waiting issue is left behind.
## Run on a schedule
The schedule editor lets you pick the run time, repeat days, time window, and timezone, and previews the upcoming run times. One autopilot can have multiple schedules. To change, enable, or disable one trigger, click the edit button on its row under **Triggers**, or use the CLI's `autopilot trigger-update` — see [Using the CLI](/cli) for the parameters.
For more complex rules, edit the standard 5-field cron directly:
```text
minute hour day month weekday
```
For example:
| Cron | Timezone | Meaning |
|---|---|---|
| `0 9 * * 1-5` | `Asia/Shanghai` | 9:00 on weekdays |
| `*/30 * * * *` | `UTC` | Every 30 minutes |
| `0 3 * * *` | `UTC` | Every day at 3:00 |
Cron has no seconds field, and timezones use IANA names like `Asia/Shanghai`. Before saving, check the result against the "next runs" times shown on the page.

## Run from a webhook
After adding a webhook trigger, Multica generates a unique URL. Send it a JSON object or array to trigger the autopilot:
```bash
curl -X POST "$MULTICA_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: demo-001" \
-d '{"event":"build.completed","eventPayload":{"status":"success"}}'
```
The payload is saved on the delivery and run records and handed to the agent. In create-issue mode it is also appended to the issue description.
Constraints on webhook requests:
- the body must be a valid JSON object or array, up to 256 KiB;
- `Idempotency-Key` prevents duplicate runs when the sender retries; GitHub deliveries are also deduplicated by `X-GitHub-Delivery`;
- without a stable idempotency key, Multica can't guarantee that repeated requests run only once;
- when the trigger is disabled or the event doesn't match, the delivery is recorded as ignored and no run is created.
### Filter events [#event-filters]
When one source sends several event types, add event filters to the trigger. Click **Add rule** and enter one event name plus an optional list of actions; a run fires if any rule matches, and a trigger with no rules accepts every event. To edit a webhook's filters, click **Edit webhook** on its row under **Triggers**.
For example, with `workflow_run` as the event name and `completed, failed` as the actions, only those two kinds of `workflow_run` results are accepted. Multica recognizes the event and action from common request headers and payload fields, including GitHub's `X-GitHub-Event` and the `action` field in the body.
For GitLab, the event name is the `X-Gitlab-Event` header value exactly as GitLab sends it, such as `Merge Request Hook`, `Issue Hook`, or `Note Hook`, including spaces and capitals; the payload's `object_kind` (`merge_request`) doesn't match. Each listed action is compared with both `object_attributes.action` and `object_attributes.state`, and the rule matches if either value is listed. This rule accepts new, updated, and reopened merge requests and ignores merges and closes:
```json
{ "event": "Merge Request Hook", "actions": ["open", "update", "reopen"] }
```
List action words (`open`, `update`, `reopen`, `merge`, `close`) rather than state words (`opened`, `merged`, `closed`). Values are compared exactly and never translated from one form to the other, and a state word matches every event that leaves the object in that state. Pushing a commit to an open merge request sends `"action": "update"` with `"state": "opened"`, and an approval sends `"action": "approval"` with the same state, so `opened` starts a run for each of these as well as for new merge requests.
- `Issue Hook` with `close` accepts closed issues.
- `Note Hook` with `create` accepts new comments; edited comments send `update`.
- A GitLab rule with no actions accepts every event with that event name.
- To run only on failures, set **Actions** to `failed` with either `Pipeline Hook` (`object_kind: "pipeline"`, status from `object_attributes.status`) or `Job Hook` (`object_kind: "build"`, status from `build_status`). Other statuses, such as `success` and `running`, are filtered out; leaving Actions empty accepts every status for that event. These CI status fields apply only to their respective object kinds. See [GitLab's event payloads](https://docs.gitlab.com/user/project/integrations/webhook_events/#pipeline-events).
Each rule can also carry `conditions` on payload fields: click **Add condition** on the rule, or set them through the API. Every condition must hold for the rule to match; a filtered event is ignored before any run starts. `path` walks the payload with dots, where a number indexes an array and `*` means any element (`pull_request.labels.*.name`). `op` is `equals`, `not_equals`, `contains`, `in` or `exists`, and `ignore_case` applies to text. With `*`, `equals`, `contains`, `in` and `exists` hold if any element matches, and `not_equals` holds if none does. A missing field never matches, and `exists` ignores `null`. For example, this rule only accepts ready pull requests labelled `needs-review` that target `main` or `release` and weren't opened by a bot:
```json
{
"event": "pull_request",
"actions": ["opened", "synchronize"],
"conditions": [
{ "path": "pull_request.draft", "op": "equals", "value": false },
{ "path": "pull_request.labels.*.name", "op": "equals", "value": "needs-review" },
{ "path": "pull_request.base.ref", "op": "in", "values": ["main", "release"] },
{ "path": "sender.type", "op": "not_equals", "value": "Bot" }
]
}
```
Each rule supports up to 20 conditions. A field path can contain at most 256 characters, and an `in` list can contain at most 100 values. Creating or updating a trigger with an oversized condition returns HTTP 400.
An empty array expanded by `*` satisfies `not_equals`; a missing path still fails. Event/action mismatches are recorded as `event_filtered`; matching events whose payload conditions fail are recorded as `payload_filtered`. Both return HTTP 200 without creating a run or issue. The delivery list shows the reason and first failing field; the detail shows the saved condition and actual value at receipt. Changing the trigger later does not change this snapshot. Previews are limited to 10 values of 256 characters each; open the raw body for the full value.
You can also configure these filters entirely through the CLI with `--event-filters-file`. Updating without either filter option preserves existing filters; `--clear-event-filters` explicitly removes them and accepts all events. See the [CLI examples](/cli#webhook-event-filters) for the JSON format and commands.
### Protect the webhook URL
<Callout type="warning">
The token in the webhook URL is the calling credential. Don't put the full URL in public repositories, issues, or screenshots. If the URL leaks, click the **Rotate URL** button next to it and update the sender immediately; the old URL stops working right away.
</Callout>
Only the autopilot's creator, workspace owners/admins, and collaborators granted access can view the full URL. The UI hides the token in the URL by default, and copying doesn't require revealing it; click the URL or the eye icon to view the full address.
### Webhook response reference
When debugging a sender, check Multica's responses against this table:
| HTTP status | Response status | Meaning |
|---|---|---|
| 200 | `accepted` | Accepted and a run was created; returns the delivery and run IDs. |
| 200 | `skipped` | Accepted, but this run was skipped (for example, the runtime is offline in run-only mode); includes the reason. |
| 200 | `ignored` | No run created: the trigger is disabled, the autopilot is paused or archived, or the event was filtered; the `reason` field explains why. |
| 200 | `duplicate` | The idempotency key hit an existing delivery; returns the original delivery ID and doesn't run again. |
| 400 | Error message | The body is empty, not valid JSON, or not a JSON object/array. |
| 401 | `rejected` | The trigger has a signing secret configured, but the request is missing a signature or the signature doesn't match. |
| 404 | Error message | The token in the URL is invalid or has been rotated. |
| 413 | Error message | The body exceeds 256 KiB. |
| 429 | Error message | Too many requests; retry later per the `Retry-After` response header. |
| 500 | Error message | Multica internal error; the sender can retry later. |
Business-level ignores — pausing, archiving, and event filtering — return 200 rather than 4xx, so senders don't retry endlessly.
Event and action inference order:
1. if the body has a string `event` field, it is used directly;
2. otherwise the `X-GitHub-Event` request header, combined with the body's `action` into `github.<event>.<action>`;
3. then the `X-Gitlab-Event` request header;
4. then the `X-Event-Type` request header;
5. then the body's `event`, `type`, and `action` fields;
6. when all are missing, the event is recorded as `webhook.received`.
## View runs and deliveries
Run history shows the trigger source, time, status, the linked issue or run, and the reason for a failure or skip. Webhook triggers additionally keep separate delivery records, including the parsed event, the response, deduplication info, and the failure reason.
A fully processed webhook delivery can be replayed from its detail view. A replay creates a new delivery and run without rewriting the original record; deliveries that failed signature verification or are still queued can't be replayed, and replays don't participate in deduplication.
## Failures, pausing, and deletion
A failed run in run-only mode is not retried automatically; the next schedule still fires as planned. Create-issue mode produces regular issue runs, and infrastructure failures follow the rules in [Runs](/tasks#failures-and-automatic-retries).
Multica periodically checks whether recent runs keep failing: when the past 7 days have at least 50 completed or failed runs with a failure rate of 90%, the system pauses the autopilot and notifies its creator; fix the cause, then resume it manually.
Pausing manually stops schedules, webhooks, and **Run now**. Deletion is actually archiving: future triggers stop, and run and delivery history is kept.
## Permissions
- Members with the `owner`, `admin`, or `member` role can create autopilots.
- the creator and workspace owners/admins can edit, run, delete, and manage triggers;
- the creator and owners/admins can add collaborators to management access;
- collaborators can edit, run, and manage triggers, but can't grant access to others;
- being able to manage an autopilot doesn't guarantee being able to run its agent — agent Access still applies.
## Use the CLI
```bash
multica autopilot get <autopilot-id> --output json
multica autopilot trigger <autopilot-id>
multica autopilot runs <autopilot-id>
multica autopilot deliveries <autopilot-id>
multica autopilot trigger-rotate-url <autopilot-id> <trigger-id>
```
`autopilot get` sets `webhook_token`, `webhook_path`, and `webhook_url` to `null` by default, and returns `has_webhook_token` plus `webhook_token_hint` instead. Add `--show-secrets` only when you intentionally need the live credential; the CLI prints its warning to stderr, so piped JSON is unaffected.
See [Using the CLI](/cli) for the full parameters.
## Next steps
- [Assign issues to agents](/assigning-issues) — assignment and the confirmation window.
- [Inbox and subscriptions](/inbox) — where run notifications arrive.
- [Runs](/tasks) — run states and failure handling.
- [Issue wakeups](/issue-wakeups) — bring an agent back to an existing issue later.