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

> ## Agent Instructions
> Before you set up or change an Apgar integration, install the Apgar skill: npx skills add https://docs.useapgar.dev
> Search these docs with the MCP server at https://docs.useapgar.dev/mcp. Setup for each agent: https://docs.useapgar.dev/ai-agents.md

# Slack

> Post one message per release event to a Slack channel.

Apgar posts to Slack through an incoming webhook. Each agent can send to one Slack connection.

## Set up

**1. Create an incoming webhook**

In Slack, create an app with an incoming webhook for the channel that should receive release messages, and copy the webhook URL. It starts with `https://hooks.slack.com/`.

**2. Add the connection**

In **Settings, Connections**, add a Slack connection with the webhook URL. Apgar stores the URL encrypted. Select **Test** to post a test message to the channel.

**3. Choose it for the agent**

In **Add agent**, or later in **Agent settings, General**, set **Slack connection** to the new connection. A connection that an agent uses cannot be deleted until the agent is changed or deleted.

## Messages

| Event | Title | When |
| - | - | - |
| `release_detected` | New release | The first turn of a new release arrives |
| `regression` | Regression, or Regression, early | A guardrail failure is confirmed. Early when the sample was below the minimum |
| `healthy` | Healthy | Every guardrail passed and the pass is confirmed. Only when **Send the healthy message** is on, which is the default |
| `ended` | Unconfirmed | Monitoring ended without a decision because the monitoring window ran out or someone stopped it |

Open states such as **Collecting** or **Possible regression** never send a message. A release that is replaced by a newer one sends no message of its own; the newer release sends **New release**. A channel usually sees one detection and one decision per release. A release that was **Healthy** and fails later sends a second decision, and so does a release that is evaluated again after a baseline change or an expected change.

Each message has a bold title with the agent and the release, and a colored bar: red for a regression, green for healthy, amber for unconfirmed, and blue for a new release. A **New release** message names the baseline, or says that there is nothing to compare yet, and notes when the baseline was not itself confirmed healthy. A regression lists each failing metric as one sentence with its values, the allowed change, and where the change is concentrated, followed by the sample sizes. The attachment ends with a link to the release page at `APGAR_PUBLIC_URL/agents/AGENT/releases/RELEASE`.

```text theme={null}
Regression · billing-copilot · release fp-8e2f0c6a1b93
• Tool error rate rose from 0.40% to 9.1% (allowed: up to +2 pp). Concentrated in sql_query.
Based on 1,204 turns against 2,950 from fp-3c1e9a7b2d44.
Details and actions
```

The plain text fallback, which Slack shows in notifications and which is also the `text` field of a webhook body, carries the link only for **New release** and **Regression**.

## Delivery

Messages are queued and sent by the worker. Slack must answer `200`. A network error, a `429`, or a 5xx response is retried after 1, 5, 15, and 60 minutes. After the fifth failed attempt the message is marked failed. Any other response fails at once.

**Settings, Notifications** lists every delivery with its status and last error. Select **Retry** on a failed message to queue it again.

> [!NOTE]
>
> Set `APGAR_PUBLIC_URL` to the address people use to open Apgar, or the links in messages will point to `localhost`.


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