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

# Alerts

> Get notified when your agent's quality drops in production.

Use an alert with a [metric](/monitor/metrics.md) to catch failures on your production conversations.

To create alerts from code, use the [Alerts API](/api-reference/endpoint/create-alert.md).

![The Alerts list with one row for each alert, showing its status such as In Alert or Active, last triggered time, metric, condition, threshold interval, threshold events, and scope](https://mintcdn.com/bluejay/EeUk0hD_moG9tWmI/images/alerts-list.png?fit=max\&auto=format\&n=EeUk0hD_moG9tWmI\&q=85\&s=9a6ea85635c69f7f60e4ed2453218f63)

## Connect a channel

**Slack**

1. In Bluejay, open **Settings → Integrations** and choose the **Slack** tab. Connect Slack there.
2. In each alert, pick the Slack channel it posts to.

**PagerDuty**

1. In PagerDuty, open the service that receives Bluejay incidents.
2. Under **Integrations**, add an **Events API V2** integration and copy its **Integration Key**.
3. In Bluejay, open **Settings → Integrations** and choose the **PagerDuty** tab. Paste the key into **Routing Key**.

**Better Stack**

1. In Better Stack, open **API tokens**, then **Team-based tokens**.
2. Select the team whose on-call rotation receives Bluejay incidents.
3. Under **Uptime API tokens**, create a token and copy it.
4. In Bluejay, open **Settings → Integrations** and choose the **Better Stack** tab. Paste the token into **API token**. Bluejay checks the token with Better Stack when you save it.

**Webhook**

Use a webhook to send alerts to your own endpoint or to start an automated flow.

1. In **Settings → Webhooks**, [create a webhook](/api-reference/webhooks.md#create-a-webhook) with your HTTPS URL and select **Observability alert triggered**.
2. Copy the signing key to your receiver so it can [verify each request](/api-reference/webhooks.md#verify-the-signature).

The webhook fires when an alert enters alarm and again when it leaves alarm.

## Create an alert

**1. Open the dialog**

In the sidebar under **Observability**, open **Alerts** and click **Create Alert**.

**2. Set the trigger and scope**

For a metric where one failure is too many, such as hallucination, set **for at least** to 1.

An alert watches only its own [workspace](/administration/workspaces.md), even when set to all agents, so create it in the workspace of the agents it should watch.

**3. Choose who gets notified**

Send failures that need action now to PagerDuty or Better Stack, and quality drops to Slack or email. Only [connected channels](#connect-a-channel) can be turned on.

![Create Alert dialog with Name, Trigger, Scope, and Notify sections, Slack Notifications on, and a Slack preview with Send test notification](https://mintcdn.com/bluejay/EeUk0hD_moG9tWmI/images/integrations-slack-alarm-dialog.png?fit=max\&auto=format\&n=EeUk0hD_moG9tWmI\&q=85\&s=ceb52fd3272aec9466b8ab8985e0af1b)

## How alerts evaluate

An alert counts the production conversations that match its condition in the window. It enters alarm when at least N conversations match, where N is the **for at least** number, and recovers when the count drops below 80% of N (minimum 1).

With a window such as the last 50 conversations, the alert does not fire until that many conversations exist.

## Incidents

PagerDuty and Better Stack receive incidents, and your escalation policy in that tool decides who gets the page.

| Source | Opens an incident | Resolves the incident |
| - | - | - |
| Uptime monitor | When the monitor goes **Down** | When the monitor recovers |
| Alert | When the alert triggers, in PagerDuty and Better Stack | When the alert recovers, in PagerDuty and Better Stack |

## Related

* [Alerts API](/api-reference/endpoint/create-alert.md)
* [Alerts MCP tools](/mcp/monitoring-tools.md#monitor)
* [Webhooks](/api-reference/webhooks.md)
* [Uptime Monitoring](/monitor/uptime/overview.md)
* [Issues](/monitor/issues.md)
* [Dashboards](/monitor/dashboards.md)


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