Skip to main content
Trinity
Guides/Slack Integration

Slack Integration

Connect agents to Slack workspaces. Supports DMs, @mentions in channels, multi-agent routing, and thread continuity.

Key Concepts

Channel Adapter — Pluggable abstraction for external messaging platforms. Slack is the first implementation; Telegram and Discord are planned.
Socket Mode — Default transport using a WebSocket connection. No public URL required. Configured via a Slack App Token (xapp-...).
Webhook Mode — HTTP webhook transport for production environments (fallback option).
Multi-Agent Routing — Multiple agents can share one Slack workspace. Each agent is bound to a dedicated channel. DMs are routed to a default agent; @mentions route to the bound agent.
Thread Tracking — The bot automatically responds to thread replies without requiring an @mention.

Platform Setup (Admin)

1

Go to Settings > Slack section.

2

Enter your Slack App Token (xapp-...) for Socket Mode.

3

Click Connect to start the Socket Mode transport.

4

Click Install to Workspace to perform platform-level OAuth and obtain a bot token.

5

The connection status badge shows connected or disconnected.

Per-Agent Channel Binding

1

Open the agent detail page and select the Sharing tab.

2

In the Slack Channel section, click Create Channel.

3

A dedicated Slack channel is created and bound to this agent. All messages in that channel are routed to the bound agent.

4

To disconnect, click Unbind.

Message Flow

Transport -> Adapter -> Router -> Agent -> Response
Message TypeRouting
DM to botDefault agent
@mention in channelBound agent for that channel
Thread reply (no @mention)Same agent that was originally mentioned

Rate Limiting

SettingDefault
Messages per window per Slack user30
Window duration60 seconds
Execution timeout120 seconds
Allowed toolsWebSearch, WebFetch

Rate limit and timeout values are configurable via settings (channel_rate_limit_max, channel_rate_limit_window).

Slack API

EndpointMethodDescription
/api/settings/slack/statusGETConnection state
/api/settings/slack/connectPOSTStart Socket Mode
/api/settings/slack/disconnectPOSTStop transport
/api/settings/slack/installPOSTOAuth install
/api/agents/{name}/slack/channelGETChannel binding status
/api/agents/{name}/slack/channelPOSTCreate and bind channel
/api/agents/{name}/slack/channelDELETEUnbind channel

Limitations

Only one Slack workspace can be connected per Trinity instance.
Webhook Mode requires a publicly accessible URL.
Thread tracking applies only to threads started by a bot message or @mention.
Rate limits are per Slack user, not per agent.