> ## 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.

# Tasks

> Save a repeatable agent job, run it automatically, and post the result to a channel.

A task is a repeatable job for an agent. It tells Mantle what the agent should do, when it should run, and which channel
should receive the result.

Examples include a morning email digest, a weekly customer-feedback summary, or a review that starts when a new issue is
created in a connected app.

## Create a task

<Steps>
  <Step title="Open Tasks">
    Select **Tasks** in the left rail, then select the **+** beside **Tasks**. You can also open the Tasks section of an
    agent.
  </Step>

  <Step title="Name the task">Use a name that describes the result, such as `Post overnight email digest`.</Step>

  <Step title="Add instructions">
    State the time range, sources, rules, and output format. The task uses these instructions together with the agent's
    own instructions.
  </Step>

  <Step title="Choose an agent">Select the agent with the right model, knowledge, and tools.</Step>

  <Step title="Choose a trigger">
    Under **Trigger**, choose **Select a trigger**. Pick **Manual**, **Schedule**, **On Complete**, or an event from a
    connected app.
  </Step>

  <Step title="Choose an output channel">
    Pick the channel where people should review the result. Use a channel made for automated updates if the task runs
    often.
  </Step>

  <Step title="Create and test">
    Select **Create Task**, then select **Run now** and review the first result before relying on the trigger. Turn the
    task **Active** only when it is ready to run automatically.
  </Step>
</Steps>

Scheduled tasks and other automatic triggers require a paid plan. Each run uses the task owner's AI credits, including
runs that were started by a schedule or app event.

## Write task instructions that can run alone

An automated run cannot ask you what you meant before it starts. Include:

* the exact time period or event to process;
* which connected account or source matters;
* what to include and exclude;
* the output length and structure;
* what to do when there is no useful result;
* when to report an error instead of guessing.

For example:

> Find email received between 18:00 yesterday and 08:00 today. Include only messages that need a reply or decision.
> Group them by urgency, give each a one-sentence summary, and include a link to the email. If none need action, post
> `No overnight email needs action.`

## Run, pause, and review

* **Run now** starts an immediate test or one-off run.
* The **active** switch allows automatic triggers to start the task.
* The task history shows recent runs and whether they completed or failed.
* Pause a task while changing its agent, instructions, connected apps, or output channel.

Read several real results after launch. A task can complete successfully and still produce an unhelpful summary.

## Connected accounts

A background task needs access to every connected app used by its agent. If a required connection expires or is removed,
the task can pause or fail instead of acting with incomplete access.

Reconnect the app, review the task, and run it manually before turning automation back on. Missed events may not run
again automatically.

The task also pauses if its owner leaves the organization or no longer has a plan that supports the trigger. An
administrator can reassign the task, check its connections, and test it before activating it again.

<Warning>
  Start with read-only or low-risk work. Before allowing an agent to send messages, update records, or create external
  work, test its instructions and limit its tools to the exact actions it needs.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.