Slack
Integrate Hybrix agents into your Slack workspace. Agents respond to mentions, direct messages, and can participate in threaded conversations.
1. Create a Slack app
- Go to
api.slack.com/appsand click “Create New App” - Choose “From scratch” and select your workspace
- Under OAuth & Permissions, add these bot token scopes:
chat:write,app_mentions:read,im:history,channels:history - Install the app to your workspace and copy the Bot User OAuth Token
- Under Basic Information, copy the Signing Secret
env
SLACK_BOT_TOKEN=xoxb-1234567890-...
SLACK_SIGNING_SECRET=abc123def456...2. Configure the channel
json
{
"channels": [
{
"type": "slack",
"token": "$SLACK_BOT_TOKEN",
"signingSecret": "$SLACK_SIGNING_SECRET",
"agents": ["Atlas"],
"respondTo": "mentions",
"threadReplies": true
}
]
}| Option | Default | Description |
|---|---|---|
| respondTo | mentions | Trigger mode: mentions, all, or dm-only |
| threadReplies | true | Reply in threads to keep channels clean |
| channels | [] | Channel IDs to listen in (empty = all) |
| unfurlLinks | false | Unfurl links in agent responses |
3. Set up event subscriptions
In your Slack app settings, go to Event Subscriptions and set the Request URL to your gateway's Slack webhook endpoint:
bash
https://your-gateway.example.com/api/channels/slack/eventsSubscribe to these bot events: app_mention, message.im, and message.channels.
For local development, use
hybrix tunnel to expose your local gateway with a public URL that Slack can reach.