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

# Slack

> Talk to your agents directly from Slack.

The Slack channel lets your team trigger agent sessions and receive responses without leaving Slack. Each connected LAP agent gets its own dedicated Slack app.

## Prerequisites

* LiteLLM Agent Platform deployed and accessible
* A LAP agent
* A Slack workspace where you can create or install apps

## 1. Open the agent Slack flow

In the LAP UI, open **Agents**, choose an agent, then click **Connect to Slack**.

The flow opens Slack with a pre-filled manifest. The manifest uses agent-specific callback URLs:

```text theme={null}
$LAP_URL/api/agents/<agent-id>/slack/events
$LAP_URL/api/agents/<agent-id>/slack/interactivity
$LAP_URL/host-oauth-callback/<provider-id>
```

## 2. Create the Slack app

Review the pre-filled manifest in Slack, create the app, then return to LAP.

The app includes the bot scopes needed for mentions, direct messages, channel messages, and replies.

## 3. Save app credentials

Paste these values from Slack's **Basic Information** page back into the LAP flow:

* App ID
* Client ID
* Client Secret
* Signing Secret

LAP stores the secrets in the vault and saves only key names on the agent config.

## 4. Connect OAuth

Click **Connect OAuth**. LAP creates a one-time state value through:

```bash theme={null}
curl -X POST $LAP_URL/api/agents/<agent-id>/slack/oauth-state \
  -H "Authorization: Bearer $MASTER_KEY"
```

Slack redirects back to `$LAP_URL/host-oauth-callback/<provider-id>`. On success, LAP stores the bot token in the vault and marks the agent as connected.

## 5. Talk to your agent

**Mention the bot in any channel:**

```
@YourBot summarize the latest PRs in the repo
```

**Or send a direct message:**

```
Hey, can you check the error logs and tell me what's failing?
```

The bot starts a new agent session, streams the response, and posts it back in the thread.

## Routing to different agents

Create a separate Slack app for each LAP agent you want to expose. Each app points to its own `/api/agents/<agent-id>/slack/...` endpoints.
