> ## Documentation Index
> Fetch the complete documentation index at: https://docs.famulor.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Milian Missions

> Give Milian recurring jobs to run on schedule.

A **Mission** is a scheduled task for the [Milian](/assistants/milian-copilot) copilot: a saved prompt that runs unattended, either on a recurring schedule or on demand, in the background — no browser tab needs to stay open. Each run produces its own Milian chat transcript, visible on the workspace **Milian Missions** page (sidebar, next to History).

Milian Missions give Milian the same toolset it has in chat — platform tools, automations, connected apps — so a mission can do anything a chat turn can do: summarize last week's calls and email the highlights, sweep for stalled leads and nudge them, post a daily digest, and similar unattended work.

## Schedule types

| Type         | Fires                                                                        | Fields                                    |
| ------------ | ---------------------------------------------------------------------------- | ----------------------------------------- |
| **Manual**   | Only when you (or Milian's `run_routine` tool) trigger it — never on its own | —                                         |
| **Hourly**   | Every hour, at a chosen minute                                               | Minute (0–59, default 0)                  |
| **Daily**    | Every day, at a chosen time                                                  | Time (`HH:MM`, default 09:00)             |
| **Weekdays** | Monday–Friday, at a chosen time                                              | Time                                      |
| **Weekly**   | Once a week, on a chosen day and time                                        | Weekday (`0`=Sunday … `6`=Saturday), time |
| **Custom**   | A 5-field cron expression (minute hour day-of-month month day-of-week)       | Cron expression                           |

All schedules run against a **timezone** (default your workspace timezone) — the fields above are wall-clock time in that zone, including through daylight-saving transitions. A **Custom** cron schedule must fire at least **10 minutes apart**; a tighter interval is rejected when you save it. An **Hourly** mission fires once per wall-clock hour at its chosen minute; when a daylight-saving transition skips or repeats a wall-clock time, the mission resolves to the first valid occurrence.

## Required connections

When a mission's prompt depends on a [Connected app](/automations/overview) — posting to Slack, reading Gmail, writing to a CRM — Milian records which apps it needs (`slack`, `gmail`, …) on the mission. A mission **refuses to be created or updated** while one of those apps is not connected, and **refuses to run** — even on its own schedule — the moment a required connection goes missing, expires, or breaks, so it never fails silently and unattended every time it fires. The Milian Missions page shows a warning on any enabled mission whose required connection is currently missing or broken, with a link to reconnect it.

## Creating a mission

Milian Missions are **chat-first**: ask Milian directly — open the copilot and describe what you want scheduled and when; Milian explains how missions work, asks the questions it needs, and proposes the mission for you. On the dashboard, the small task icon next to the help icon (and the **New mission** button on the Milian Missions page) inserts a ready-made starter prompt into the composer.

Creating, updating, or deleting a mission through chat always shows an **Approve / Cancel** confirmation card first — Milian never saves a change on its own. The card summarizes exactly what will change (name, prompt, schedule, timezone, enabled state); nothing happens until you click Approve, and Cancel discards the proposal.

## Managing a mission

The **Milian Missions** page lists your missions and lets you edit, run, and delete them — but not create one (see above). Opening a mission there lets you change its name, prompt, schedule type and its fields, timezone, and enabled/disabled toggle. Toggling a mission off pauses it (clears its next run) without deleting it; toggling it back on recomputes the next run from the current time. **Run now** starts an off-schedule run immediately; **Delete mission** removes it for good.

## Background execution & transcripts

On schedule (or when triggered manually), a mission's prompt is sent to Milian as a durable background run — it keeps executing even if you close the browser. The run appears as a normal Milian chat thread; open it from the Milian Missions page to read the full transcript, including which tools Milian used. Run transcripts are kept for **10 days**.

Each mission also tracks its last run's outcome (succeeded, failed, or still running) and the next scheduled run, both shown on the Milian Missions page.

Before finishing, Milian re-checks the result of every tool the run relied on — a tool call that errored or came back empty gets retried once, and if it still fails the transcript states plainly what did not work instead of quietly claiming success. A run's status only reads Succeeded when it actually produced a result; the Milian Missions page also flags a run's tool errors (a "N tool errors" indicator) even when its overall status is Succeeded, so you can tell a clean run apart from one where something underneath it failed.

## Mission billing

Milian Missions capacity is sold as a monthly add-on unless it is already included in a platform-authored plan. Each purchased unit adds one mission. Every mission run also uses the normal per-turn Milian credits from your workspace balance. If the balance is insufficient when a run is due, the run fails and the mission reschedules for its next occurrence.

## Mission plan limits

The number of missions a workspace can have is its included plan capacity plus purchased Milian Missions units (`-1` = unlimited, `0` = unavailable without the add-on). Creating a mission past that capacity is rejected until you delete one or add capacity.

## API & MCP

Everything above is available in the [public REST API](/api-reference/introduction) and as MCP tools at `https://<your-domain>/mcp`:

| REST                                     | MCP tool                                          | Scope                             |
| ---------------------------------------- | ------------------------------------------------- | --------------------------------- |
| `GET/POST /api/v1/routines`              | `list_routines`, `create_routine`                 | `routines:read`, `routines:write` |
| `GET/PATCH/DELETE /api/v1/routines/{id}` | `get_routine`, `update_routine`, `delete_routine` | `routines:read/write`             |
| `POST /api/v1/routines/{id}/run`         | `run_routine`                                     | `routines:write`                  |
| `GET /api/v1/routines/{id}/runs`         | `list_routine_runs`                               | `routines:read`                   |

API keys and OAuth tokens have no signed-in end user, so these endpoints act as the workspace's oldest owner member — the same actor a Milian chat turn on your own account would use when you're signed in.

## What a mission may do on its own

A mission runs unattended, so Milian cannot stop and ask you mid-run. Within a
mission it therefore proceeds on the actions your prompt implies — including
ones that spend credits or reach real people, such as placing calls, sending
messages or running a connected-app action. Treat a mission's prompt as
standing approval for exactly that work, and keep prompts narrow.

Four things stay off-limits in a mission, because no scheduled task needs them
and the damage would outlive the run: creating API keys, buying phone numbers,
changing consent mode, and changing data-retention settings. Milian will say so
and ask you to do them from a chat instead.

Be deliberate with missions that read content you do not control — inbound
email, call transcripts, web pages, records from a connected app. Instructions
hidden in that text can influence the run. Give such missions a narrow prompt
and review their transcripts.

A mission that produces a result can deliver it directly, instead of just
leaving it in its own transcript: by email, to a chat channel (Slack, Teams,
Discord, and similar), by SMS or WhatsApp, or to a webhook/external API — and
it can run a single automation action to do so without first building a whole
[automation](/automations/overview). These are real actions with real effects:
an email actually sent, a message actually posted, a request actually made.
