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

# Slack

> Use Slack as a collaboration surface for the agents your Avibe runs locally.

# Slack

Slack is the most polished Avibe surface today — it supports threads, Socket Mode, buttons, modals, and rich interaction patterns.

## What you get

* Mention the bot to start a task.
* Continue work in a thread — each thread is an isolated, resumable session.
* Approve interactive prompts (buttons, modals) without opening a terminal.
* Receive completion notifications.

## Set up the app

The wizard does the heavy lifting. In the Avibe setup wizard, choose **Slack** and:

1. Click **Create Slack App** — Slack opens with a manifest pre-filled (name, scopes, events, and Socket Mode all set).
2. Pick your workspace, click **Create**, and install the app to the workspace.
3. Follow the accordion to copy the **Bot token** (`xoxb-…`) and the **App-level token** (`xapp-…`).
4. Click **Validate Tokens**, then finish and start the service.

<details>
  <summary><b>What the app needs (for manual setup)</b></summary>

  If you'd rather build the app by hand at [api.slack.com/apps](https://api.slack.com/apps):

  * **Socket Mode: enabled** — Avibe connects out over Socket Mode, so there are no public inbound webhooks.
  * An **app-level token** (`xapp-…`) with the **`connections:write`** scope.
  * A **bot token** (`xoxb-…`) with the message, mention, file, and reaction scopes: `app_mentions:read`, `channels:history` / `channels:read`, `groups:history` / `groups:read`, `im:history` / `im:read` / `im:write`, `mpim:history` / `mpim:read` / `mpim:write`, `chat:write`, `users:read`, `commands`, `files:read` / `files:write`, `reactions:read` / `reactions:write`.
  * **Event subscriptions** for `app_mention`, the `message.*` events, and `reaction_added` / `reaction_removed`; **Interactivity** enabled.

  The **Create Slack App** button pre-fills all of this as a manifest, so manual setup is only for the curious.
</details>

## Use it in Slack

* Invite the bot to a channel: `/invite @Avibe`.
* **Mention the bot** to start; **reply in the thread** to continue the same session.
* To use it in a **DM**, send `bind <code>` with the bind code shown in the Web UI.
* Route to a specific agent by prefixing your message: `AgentName: do the thing`.

## Smoke test

After the wizard reports a healthy Slack connection, mention the bot in an enabled channel:

```text theme={null}
@Avibe say hello and tell me which project directory you are running in
```

Reply in a thread to continue the same agent session.

## Outbound proxy

When the host running Avibe cannot reach Slack directly, set `proxy_url` on the Slack config block from the Web UI. Both HTTP/HTTPS proxies and SOCKS proxies are supported (any `socks*://` scheme — `socks4`, `socks4a`, `socks5`, or `socks5h`). Saving the config block only persists the change; run `vibe restart --delay-seconds 60` afterwards so the new transport applies to live connections.

## Common issues

| Symptom                           | Check                                                                         |
| --------------------------------- | ----------------------------------------------------------------------------- |
| Bot does not answer               | Bot is invited to the channel and the channel is enabled                      |
| Socket Mode fails                 | App-level token has the `connections:write` scope, and Socket Mode is enabled |
| Events arrive but no agent starts | Selected backend CLI exists on PATH                                           |
| Thread loses context              | Reply inside the same thread, not as a new top-level message                  |
| Slack unreachable from host       | `proxy_url` on Slack config; check firewall and TLS errors in logs            |
