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

# Triggers

> Control when your agent tasks run — on demand, on a schedule, or when an event happens

A trigger defines **when** a task fires. Every task has exactly one trigger. Pick the right trigger for your use case
and Mantle handles the rest.

<CardGroup cols={2}>
  <Card title="Manual" icon="hand-pointer" href="#manual">
    Run when you press a button
  </Card>

  <Card title="Schedule" icon="calendar-clock" href="#schedule">
    Run on a time-based schedule
  </Card>

  <Card title="On Complete" icon="link" href="#on-complete">
    Run after another task finishes
  </Card>

  <Card title="Integrations" icon="plug" href="#integrations">
    Run when something happens in a connected app
  </Card>
</CardGroup>

***

## Manual

The simplest trigger. The task runs when **you** press the **Run now** button — nothing fires automatically.

<Note>Each agent can have at most one manual task. This is the "on demand" button you always have available.</Note>

**When to use it:**

* Deep-dive research you want to kick off yourself
* Reports you generate occasionally, not on a fixed schedule
* Testing an agent before automating it further
* One-off tasks where timing doesn't matter

**What it looks like in practice:**

```
Open task page → Press Run now → Agent executes → Result in chosen channel
```

**Common examples:**

* *"Analyze this week's data"* — you run it whenever you're ready to review
* *"Draft a proposal for \[client]"* — triggered when you start working on a pitch
* *"Summarize my notes"* — run before a meeting when you need a quick brief

<Tip>
  Manual tasks are a great starting point. Once you see the agent working well, switch the trigger to a schedule or
  integration.
</Tip>

***

## Schedule

The task runs automatically at a set time or interval. No manual action needed.

**Frequency options:**

| Frequency   | Example                                         |
| ----------- | ----------------------------------------------- |
| **Once**    | Fire at a specific date and time                |
| **Minute**  | Every N minutes                                 |
| **Hourly**  | Every hour, or every N hours                    |
| **Daily**   | Every day at a set time                         |
| **Weekly**  | On specific days of the week                    |
| **Monthly** | On a specific date or day (e.g., 1st Monday)    |
| **Yearly**  | Once a year                                     |
| **Custom**  | Every N minutes / hours / days / weeks / months |

**Configuration:**

* **Time** — pick the time in 15-minute intervals
* **Timezone** — your local timezone is pre-selected; change it if needed
* **Start date** — optional; the task won't fire before this date
* **End condition** — run forever, stop after N runs, or stop on a specific date

**Common examples:**

* *Daily digest* — daily at 8am
* *Weekly report* — every Monday at 9am
* *Metrics check* — every hour
* *Monthly invoice summary* — 1st of each month at 7am

***

## On Complete

The task fires when another task finishes. This is how you build **task chains** — multi-step agent pipelines where each
step hands off to the next.

```
Task A completes  ──►  Task B fires  ──►  Task C fires
```

**Configuration:**

* **Source task** — which task to watch
* **Fire when** — Succeeds / Fails / Either
* **Pass upstream output** — inject the previous task's response into this task's context

**When to use it:**

* Building a research → edit → publish pipeline
* Handling errors: run a fallback agent when the main task fails
* Sequential steps where each stage needs the previous one's output

**Common examples:**

* *Researcher → Editor → Publisher* — three agents, each improving the previous output
* *Monitor → Alert* — a watcher task fails, fires an incident-reporting agent
* *Fetch → Format → Send* — gather data, format it, post to Slack

<Note>
  Chains are limited to 10 steps. One task can fan out to at most 5 downstream tasks. Cycles (A → B → A) are blocked at
  save time.
</Note>

***

## Integrations

Trigger a task when something happens in a connected app — a new issue in Linear, a payment in Stripe, a webhook from
any connected tool.

**Available integrations:**

| Integration        | Example triggers                                              |
| ------------------ | ------------------------------------------------------------- |
| **Linear**         | Issue created, status changed, comment added, assigned        |
| **Stripe**         | Payment succeeded, subscription cancelled, checkout completed |
| **Connected apps** | Any event from apps connected via your workspace integrations |

<Info>
  Connect an integration from your workspace settings. Once connected, its trigger events appear in the trigger picker.
</Info>

**Common examples:**

* *New Linear issue* → agent triages it, adds labels, and posts a summary to #engineering
* *Payment failed* → agent drafts a customer recovery email
* *Subscription cancelled* → agent logs context and notifies the team in #revenue

***

## Choosing the right trigger

| You want to…                                              | Use                                      |
| --------------------------------------------------------- | ---------------------------------------- |
| Run the agent whenever you feel like it                   | **Manual**                               |
| Run automatically every morning                           | **Schedule — daily**                     |
| Run on a repeating cycle                                  | **Schedule — hourly / weekly / monthly** |
| React to another task finishing                           | **On Complete**                          |
| React to an external event (Linear issue, Stripe payment) | **Integration trigger**                  |
| Test an agent before automating it                        | **Manual** first, then switch            |

***

<Card title="Back to Tasks" icon="list-check" href="/features/tasks">
  Learn how tasks connect to agents and how to set up your first automation
</Card>
