> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.

# alerts

Manage the [Alerts](/docs/optimization/performance/alerts) of your AI Agent: the rules that watch its health metrics, and the people who get the alert emails. A rule watches one metric and sends an alert when the metric breaks the rule.

## Commands

| Command                              | What it does                                                                               |
| ------------------------------------ | ------------------------------------------------------------------------------------------ |
| `alerts metrics`                     | Lists the metrics that a rule can use.                                                     |
| `alerts rules list`                  | Lists the rules, with their alert state.                                                   |
| `alerts rules create`                | Creates a rule.                                                                            |
| `alerts rules update <id>`           | Changes the fields that you pass, or turns a rule on or off.                               |
| `alerts rules delete <id>`           | Deletes a rule.                                                                            |
| `alerts rules preview`               | Shows when a draft rule would have sent an alert and recovered over the last 1 to 14 days. |
| `alerts email list`                  | Lists the users who can see the alerts, and who gets the emails.                           |
| `alerts email enable [emails...]`    | Turns on the alert emails for dashboard users. With `--me`, includes you.                  |
| `alerts email disable [emails...]`   | Turns off the alert emails for dashboard users.                                            |
| `alerts email add <addresses...>`    | Sends the alert emails to business addresses outside the dashboard.                        |
| `alerts email remove <addresses...>` | Stops the alert emails to addresses outside the dashboard.                                 |
| `alerts history`                     | Lists the published alerts, newest first.                                                  |

## Examples

Check a rule on the data of the last 14 days before you create it:

```bash
adacli acme alerts rules preview --metric containment_rate --direction down --min-change 0.12 --days 14
```

Create a rule that sends an alert when containment drops 12 points below usual:

```bash
adacli acme alerts rules create --name "Containment drop" --metric containment_rate --direction down --min-change 0.12
```

Create a rule that sends an alert when volume goes below 50:

```bash
adacli acme alerts rules create --name "Low volume" --metric volume --min 50
```

Turn on the alert emails for yourself and a colleague:

```bash
adacli acme alerts email enable --me sam@example.com
```

List the alerts of the last 24 hours:

```bash
adacli acme alerts history --since 24h
```

## Details

* A rule uses a threshold or a relative change. For a threshold, use `--min` and `--max`. Pass `none` to remove a limit.
* For a relative change, use `--direction` and `--min-change`. For a rate, `0.12` is 12 points. For a count, the value is a ratio, such as `2`.
* `--baseline-days` sets the past data that gives the usual value: `1`, `7`, `14`, or `28`. The default on `create` is `14`.
* Leave out `--channel` on `create` to watch all channels. On `update`, pass `""` for all channels.
* `email add` and `email remove` are for owners and admins only. The API refuses an address on a public domain, such as gmail.com. An AI Agent has a maximum of 5 outside addresses.
* `email enable` and `email disable` change all the users that you name, or none of them.
* If the alert email endpoint on the Webhooks page is off, no email goes out. Turn it on again on the Webhooks page.

For every option of a command, run it with `--help`, for example `adacli acme alerts rules create --help`.

## Related commands

* [`analytics`](/adacli/commands/analytics): read the metrics that a rule watches.
* [`conversations`](/adacli/commands/conversations): find the conversations behind an alert.

---

Have any questions? Contact your Ada team, or email us at [](mailto:help@ada.cx?subject=Help%20Docs%20inquiry).