Slack Adapter
Requires pip install agentix[gateway-slack].
Programmatic setup
from agentix.gateway import AgentixGateway
from agentix.gateway.adapters.slack import SlackAdapter
gateway = AgentixGateway(options)
gateway.add_channel(
SlackAdapter(
bot_token="xoxb-...", # Slack Bot Token
signing_secret="...", # Slack Signing Secret (for request verification)
app_token=None, # optional: for Socket Mode
)
)
YAML config
channels:
slack:
type: slack
bot_token: "${SLACK_BOT_TOKEN}"
signing_secret: "${SLACK_SIGNING_SECRET}"
Slack app setup
- Create a Slack app at https://api.slack.com/apps
- Add Bot Token Scopes:
chat:write,im:history,im:read,channels:history - Enable Event Subscriptions → subscribe to
message.imandmessage.channels - Set Request URL to
https://your-gateway-host/slack/events - Install the app to your workspace
Webhook endpoint
The adapter registers POST /slack/events on the gateway server.
Session mapping
Each Slack user ID maps to a dedicated agent session. Sessions persist for session_ttl seconds after the last message.