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

# Slack Bot

> AI-powered Q&A and knowledge extraction in Slack

The Whilst Slack bot accepts `@mention` queries, routes them to the appropriate data source, and responds with progressive updates and a final summarized answer.

## How It Works

1. **Mention** `@whilst` in any Slack channel with a question
2. Bot sends an **instant acknowledgement** (within 3 seconds)
3. **Progressive updates** show what's happening ("Searching GitHub…")
4. **Final answer** posted as a threaded reply with citations
5. **Knowledge Pipeline** runs in background to extract and document the conversation

## Supported Data Sources

Whilst routes queries to the appropriate MCP adapter based on intent:

| Source      | Status  | Example Query                             |
| ----------- | ------- | ----------------------------------------- |
| GitHub      | ✅ Live  | "What's the latest open PR about churn?"  |
| Linear      | ✅ Live  | "What's the status of the auth refactor?" |
| Notion      | 🔜 Soon | "Find the product spec for onboarding"    |
| Whilst Docs | ✅ Live  | "What do we know about deployment?"       |

## Progressive Updates

The bot uses Slack's `chat.update` API to edit its original message as work progresses:

```
🔍 Searching GitHub for relevant PRs...
    ↓
📊 Found 3 results, analyzing...
    ↓
✅ Here's what I found: [final answer with citations]
```

Rate limiting is handled via Slack API cadence controls with graceful degradation to a single final message on persistent 429s.

## Multi-Tenant Architecture

Each Slack workspace has its own:

* Bot token (encrypted at rest)
* MCP credentials per data source
* Job history and audit trail
* Document corpus and embeddings

Credentials are resolved per-workspace from AWS Secrets Manager at `/whilst/<env>/workspaces/<workspaceId>/...`.

## Setup

See the [Slack Setup Guide](/guides/slack-setup) for installation and OAuth configuration.
