Slack
The Slack channel integrates Open Astra agents into your Slack workspace. Agents respond to direct messages, app mentions, and slash commands. Responses use Slack's Block Kit for rich formatting.
Setup
- Go to api.slack.com/apps and create a new app
- Under OAuth and Permissions, add the required bot scopes (see below) and install the app to your workspace
- Copy the Bot User OAuth Token (
xoxb-...) - Under Basic Information, copy the Signing Secret
- Configure the Request URL for events and slash commands to point to your Astra gateway:
https://your-domain/channels/slack - Add to your environment:
bash
SLACK_BOT_TOKEN=xoxb-your-token
SLACK_SIGNING_SECRET=your-signing-secretRequired OAuth scopes
| Scope | Required for |
|---|---|
chat:write | Sending messages |
app_mentions:read | Responding to @mentions |
im:history | Reading direct message history |
im:write | Sending direct messages |
files:read | Accessing files sent by users |
commands | Responding to slash commands |
Configuration in astra.yml
yaml
channels:
slack:
enabled: true
defaultAgent: team-agent
allowedChannelIds: [] # Empty means all channels
mentionOnly: true # Only respond when @mentioned in channelsFeatures
- Block Kit — structured responses use Slack's Block Kit layout for tables, sections, and buttons
- Thread replies — agent responses are sent as thread replies to keep channels clean
- Slash commands — all shared commands are registered as Slack slash commands
- File context — files shared in the same message are provided to the agent
- Signature verification — all incoming webhooks are verified using the Slack signing secret
ℹSlack requires your gateway to have a publicly accessible HTTPS URL for the webhook endpoint. In development, use a tunnel like ngrok:
ngrok http 3000.