# Create and manage automations

> Set up an automation, test it, see its runs, and turn it off or delete it.

Owners and admins create automations from a form, or by asking the [Assistant](/get-started/assistant/), for example “Every week, scan for outdated dependencies and open an issue.” An automation the Assistant creates is on at once and uses credits the next time its trigger matches.

## Create an automation

1. In the sidebar, select **Automations**, then **New Automation**.
2. Enter a **Name** and, if you want, a **Description**.
3. Leave **Enable agent** selected to turn the automation on when you save.
4. In **Instructions**, describe what devlo should look at and what it should do.
5. Pick a **Model**, or keep the default. More capable models use more credits.
6. Under **Capabilities**, select the actions devlo may take. For **Send Email**, type each recipient and press Enter.
7. Set **Scope** to **All repositories** or **Selected repositories**.
8. Under **Event Triggers**, set **Trigger 1** to the event or schedule you want, and add filters to narrow it. **Trigger 1** starts as **New Pull Request**; if you add a trigger instead of changing it, the automation also runs on new pull requests.
9. Select **Create Automation**.

![The New Automation form with capabilities, scope, and a weekly schedule trigger.](/_astro/automation-new-triggers.D8sKQIAM_Z3Rrr3.webp)

## Write good instructions

* Say what to look at, what to do, and what to leave alone.
* Name the output: “Post one comment” or “Open one issue per finding”.
* Match your instructions to the capabilities you select.
* Start with one repository and one trigger, then widen the scope.
* Put conventions every run should follow, such as test commands, in [`AGENTS.md`](/coding/writing-tasks/#repository-instructions).

## Test an automation

Caution

A test run starts one run per repository in [scope](/automations/triggers/#scope), and each uses credits. Runs can’t be stopped once they start, so narrow **Scope** before you test.

For a scheduled automation, select the play button next to it in **Automations**, or **Test run** on its **Configuration** tab. For an event automation, cause the event in a test repository.

## See runs

In **Automations**, select an automation, then the **Runs** tab. Each run links to what it produced and shows the credits it used. A run uses credits for the work it did, even if it stops early or doesn’t finish. Select **Show trace** to see the steps devlo took. If a run you expected isn’t listed, see [If an automation doesn’t run](/automations/triggers/#if-an-automation-doesnt-run).

The Code Reviewer’s **Runs** tab lists reviews instead.

## Turn an automation on or off

In **Automations**, select an automation’s **Active** or **Inactive** status. Built-in automations always show **Active**; to turn one off, clear **Enable agent** on its **Configuration** tab and select **Save**.

## Delete an automation

Deleting can’t be undone and removes the automation’s runs and traces; to keep them, turn it off instead. To delete one, select the trash icon next to it, then confirm.

## Related

* [Triggers and capabilities](/automations/triggers/)
* [Example automations](/automations/examples/)
