Skip to content
Docs

Slack

Slack is a communication channel for agents that need to participate in team conversations. A Slack-connected agent can receive events from Slack, route each message to the right agent instance, and respond back to direct messages or channel mentions.

Use Slack when you want an agent to:

  • Respond to direct messages from Slack users.
  • Reply when mentioned in public channels.
  • Maintain context inside Slack threads.
  • Serve multiple Slack workspaces from one deployment.

How it works

Slack sends events to your Worker through the Slack Events API. Your Worker verifies each request, identifies the installed workspace, and routes the event to an agent instance.

Common Slack events include:

EventUse case
message.imDirect messages to the bot
app_mentionMentions in channels

For multi-workspace Slack apps, store each workspace installation separately and route events by team or enterprise ID. Each workspace can map to an isolated agent instance with its own Durable Object-backed state.

Build a Slack agent

For a complete walkthrough, including Slack app setup, OAuth, event subscriptions, and deployment, use the Slack agent example.