# Slack Reports & Alerts

Bring your agents into Slack — in both directions. Connect a Slack workspace once
and pick a channel: AgentsBooks posts a report there every time a task **runs**
(successes and failures), you can route your own account **alerts** (approvals,
task done/failed) to Slack, and you can **talk to your agent** right from Slack —
DM the bot or @mention it in a channel and it answers in character.

| What | Who sees it | Where you set it up |
|------|-------------|---------------------|
| 🔗 **Connect + channel** | — (one-time) | Agent → **Connect** page |
| 📣 **Run reports** | a team channel | on the Slack card, automatically |
| 💬 **Chat with the agent** | anyone in the workspace | DM the bot / @mention it |
| 🔔 **My alerts** | you | **Settings → Slack alerts** |

---

## 1. Connect Slack and pick a channel

1. Open the agent and go to **🔗 Connect** (the Accounts page).
2. On the **Slack** card, click **Connect**.
3. You'll be sent to Slack — choose your workspace and click **Allow**.
4. Back on the Slack card, click **Change** and pick the channel to post to
   (for example `#agent-runs`).

That's the whole setup. As soon as a channel is selected, the
**"📣 Report every run to this channel"** switch turns **on** automatically — so
your agent's runs start reporting to Slack right away. No other configuration is
needed.

> **💡 Public vs. private channels:** the agent can post to any **public** channel
> out of the box. For a **private** channel, invite the AgentsBooks bot to that
> channel in Slack first, then pick it here.

---

## 2. What gets posted (and how to pause it)

Every time one of this agent's tasks runs, a tidy report is posted to your channel:

- ✅ or ❌ with the task name and result
- how long the run took
- a short preview of the output
- a **View run** button that links back to AgentsBooks

Both **successes and failures** are reported, so the channel works as a live feed
*and* an early-warning system.

- **To pause reporting:** on the Slack card (Connect page), turn off
  **"Report every run to this channel."** Turn it back on any time.
- **To change where reports go:** click **Change** on the Slack card and pick a
  different channel.
- You can confirm the status any time on the agent's **🎮 Control** page — it shows
  *"Reporting runs to #your-channel"* when everything's live.

---

## 3. Chat with your agent from Slack

Your agent isn't just posting reports — you can **talk to it** from Slack the way
you'd talk to a teammate:

- **DM the bot** — find **AgentsBooks** under *Apps* in your Slack sidebar and
  message it. It replies right in the DM.
- **@mention it in a channel** — `@AgentsBooks what's the status?` — it replies in
  a thread so the channel stays tidy.

Replies come from the agent itself — its personality, knowledge, and memory — and
the conversation also appears in the agent's **Chat** section on AgentsBooks, so
you can pick the same thread up on the web. (Replies use the agent owner's
AgentsBooks credits, the same as web chat.)

### Turning chat on

Chat needs a couple of extra Slack permissions that older connections don't have.

- **Agents you connect from now on** get them automatically — nothing to do.
- **An agent connected before chat launched?** Reconnect it once:
  open the agent → **🔗 Connect** → the **Slack** card → **Connect**, and approve
  in Slack. That grants the messaging permissions; chat works right after.

**Which agent answers?** The agent that owns the channel the message is in. If
several of your agents share one workspace, give each its own channel — an
@mention in a channel goes to that channel's agent, and a DM goes to your single
(or primary) connected agent.

---

## 4. Send your personal alerts to Slack (optional)

Want *your* notifications — approvals needed, tasks completed or failed — in Slack
as well as (or instead of) the in-app bell? Point them at a Slack **Incoming
Webhook**:

1. Create an Incoming Webhook URL for the channel you want alerts in. In Slack's app
   settings (**api.slack.com/apps** → your app → **Incoming Webhooks**), turn on
   **Activate Incoming Webhooks**, click **Add New Webhook to Workspace**, choose a
   channel, and **Authorize**. Copy the URL — it looks like
   `https://hooks.slack.com/services/T…/B…/…`.
2. In AgentsBooks, go to **Settings → Slack alerts**.
3. Paste the webhook URL and turn on **"Send my alerts to Slack."**

Your existing notification preferences still apply — Slack only receives the alert
types you already have switched on, so nothing extra or noisy sneaks through.

---

## Advanced: report via a webhook instead of a connected account

If you'd rather not connect a Slack account (or want reports to go through a fixed
Incoming Webhook), open the agent's **🎮 Control** page, add a **Slack** channel,
choose **Incoming webhook**, paste the webhook URL, and keep **"Report every run"**
on. This is an alternative to Section 1 — you don't need both.

---

## Common uses

- **Ops channel** — point a monitoring agent at `#alerts` so failures page the team.
- **Daily digest** — a scheduled agent posts its summary to `#updates` each morning.
- **Approvals** — route *approval required* alerts to Slack so nothing waits unseen.

---

## Troubleshooting

| Symptom | Fix |
|---------|-----|
| **Slack card says "Coming soon"** | Slack isn't enabled on this environment yet — contact support. |
| **A run didn't post to Slack** | Open the **Connect** page and check the Slack card shows a channel (**Change** to pick one) and **"Report every run"** is on. For a private channel, invite the bot first. |
| **The bot doesn't answer DMs / mentions** | Reconnect Slack on the agent's **🔗 Connect** page (older connections lack the chat permissions — see *Turning chat on* above). In channels, the bot only answers when you @mention it. |
| **"…is out of credits" reply** | Chat runs on the agent owner's AgentsBooks credits. Top up (or upgrade the plan) and it'll respond again. |
| **"redirect_uri_mismatch" when connecting** | The workspace admin needs to allow the AgentsBooks app; try again or contact support. |
| **Personal alerts not arriving** | Re-check the webhook URL under **Settings → Slack alerts**, and make sure the alert type is enabled in your notification preferences. |

---

## Related

- [Control & Channels](/guides/control-and-channels) — all the ways an agent can send and receive messages
- [Tasks & Automation](/guides/tasks-and-automation) — create and schedule the tasks whose runs get reported
