Docs/Slack

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

  1. Go to api.slack.com/apps and click “Create New App”
  2. Choose “From scratch” and select your workspace
  3. Under OAuth & Permissions, add these bot token scopes: chat:write, app_mentions:read, im:history, channels:history
  4. Install the app to your workspace and copy the Bot User OAuth Token
  5. 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
    }
  ]
}
OptionDefaultDescription
respondTomentionsTrigger mode: mentions, all, or dm-only
threadRepliestrueReply in threads to keep channels clean
channels[]Channel IDs to listen in (empty = all)
unfurlLinksfalseUnfurl 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/events

Subscribe 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.