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

# Alerts

> Watch your metrics and get notified in Slack, email, or a webhook when results fall outside expected thresholds.

**Alerts** watch your metrics and notify you when results cross a threshold. When a [simulation](/concepts/simulations/overview) or [live conversation](/concepts/conversations/overview) finishes, Coval evaluates your conditions against the new results and dispatches notifications through the active channels.

## Creating an alert

Open **Alerts** from the sidebar and click **Create Alert**. Give the alert a name and optional description, then configure what it watches, where it applies, and how it notifies your team.

### What to alert on

| Field          | What it does                                                                                                    |
| -------------- | --------------------------------------------------------------------------------------------------------------- |
| **Watch**      | **Per Conversation** checks each conversation independently. **Per Run** checks aggregate results across a run. |
| **Match Mode** | With multiple conditions, require either **All conditions (AND)** or **Any condition (OR)**.                    |
| **Conditions** | Define one or more metric, aggregate, status, or baseline checks.                                               |

### Where to apply the alert

| Field                                      | What it does                                                                                |
| ------------------------------------------ | ------------------------------------------------------------------------------------------- |
| **Conversation Type**                      | Apply the alert to **All**, **Monitoring** (live conversations), or **Simulation** results. |
| **Tags** / **Agents** / **Scheduled Runs** | Restrict evaluation to matching tags, agents, or scheduled runs.                            |

## Conditions

Available conditions depend on the **Watch** setting:

| Watch            | Condition              | Description                                                                       |
| ---------------- | ---------------------- | --------------------------------------------------------------------------------- |
| Per Conversation | **Metric value**       | Compare a metric from each conversation with a numeric threshold or string value. |
| Per Run          | **Percent match**      | Check what fraction of conversations match a string value.                        |
| Per Run          | **Average**            | Compare a numeric metric's average across the run with a threshold.               |
| Per Run          | **Run status**         | Trigger when the run completes successfully or fails.                             |
| Per Run          | **Baseline deviation** | Check how many conversations fall outside a numeric metric's rolling baseline.    |

Numeric metrics support `>` `>=` `<` `<=` `=` and `!=`. String metrics support exact, not exact, contains, not contains, and case-insensitive matching.

## Channels

Enable any combination of notification channels:

| Channel          | Configuration                                                                                                        |
| ---------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Slack**        | A channel name or ID. Connect Slack first under **Settings > Integrations**.                                         |
| **Email**        | One or more recipient addresses.                                                                                     |
| **Webhook**      | A URL and HTTP method, with optional authentication and custom headers.                                              |
| **Human Review** | A Human Review project and sample rate. Triggered events are routed to the project and generate email notifications. |

## Advanced settings

* **Cooldown (seconds)** sets the minimum time between notifications, from 0 to 86400 seconds (24 hours). Matches during the cooldown are suppressed.
* **Custom Message Template** overrides the notification text with variables such as `{{monitor_name}}`, `{{metric_name}}`, `{{actual_value}}`, `{{threshold}}`, `{{outcome}}`, and `{{run_url}}`.

<Note>
  The template variable picker labels `{{monitor_name}}` as **Alert Name**. The token keeps its legacy name for compatibility; `{{alert_name}}` is not supported yet.
</Note>

## API access

Use the [Alerts API](/api-reference/alerts/list-alerts) to create and manage alerts programmatically. New integrations should use the canonical `/v1/alerts` endpoints. The existing `/v1/monitors` endpoints remain supported for compatibility.
