Skip to content

Slack

Connect Archon to Slack so you can interact with your AI coding assistant from any Slack workspace.

  • Archon server running (see Getting Started)
  • A Slack workspace where you have permission to install apps

Archon uses Socket Mode for Slack integration, which means:

  • No public HTTP endpoints needed
  • Works behind firewalls
  • Simpler local development
  • Not suitable for Slack App Directory (fine for personal/team use)
  1. Go to Slack API Apps
  2. Log in if prompted
  3. Choose the workspace for your app
  4. Click Create New App
  5. Choose From scratch
  6. Enter:
    • App Name: Any name (this is what you will use to @mention the bot)
    • Workspace: Select your workspace
  7. Click Create App
  1. In the left sidebar, click Socket Mode
  2. Toggle Enable Socket Mode to ON
  3. When prompted, create an App-Level Token:
    • Token Name: socket-mode
    • Scopes: Add connections:write
    • Click Generate
  4. Copy the token (starts with xapp-) — this is your SLACK_APP_TOKEN
  5. Copy the token and put it in your .env file
  1. In the left sidebar, click OAuth & Permissions
  2. Scroll down to Scopes > Bot Token Scopes
  3. Add these scopes to bot token scopes:
    • app_mentions:read — Receive @mention events
    • chat:write — Send messages
    • channels:history — Read messages in public channels (for thread context)
    • channels:join — Allow bot to join public channels
    • groups:history — Read messages in private channels (optional)
    • im:history — Read DM history (for DM support)
    • im:write — Send DMs
    • im:read — Read DM history (for DM support)
    • mpim:history — Read group DM history (optional)
    • mpim:write — Send group DMs
  1. In the left sidebar, click Event Subscriptions
  2. Toggle Enable Events to ON
  3. Under Subscribe to bot events, add:
    • app_mention — When someone @mentions your bot
    • message.im — Direct messages to your bot
    • message.channels — Messages in public channels (optional, for broader context)
    • message.groups — Messages in private channels (optional)
  4. Click Save Changes
  1. In the left sidebar, click Install App
  2. Click Install to Workspace
  3. Review the permissions and click Allow
  4. Copy the Bot User OAuth Token (starts with xoxb-) — this is your SLACK_BOT_TOKEN
  5. Set the bot token in your .env file

Add to your .env file:

SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_APP_TOKEN=xapp-your-app-token
  1. Go to the Slack channel where you want to use the bot
  2. Type /invite @your-bot (your bot’s display name)
  3. The bot should now respond to @mentions in that channel

To restrict bot access to specific users:

  1. In Slack, go to a user’s profile > click ”…” > “Copy member ID”
  2. Add to environment:
SLACK_ALLOWED_USER_IDS=U01ABC123,U02DEF456

When set, only listed user IDs can interact with the bot. When empty/unset, the bot responds to all users.

SLACK_STREAMING_MODE=batch # batch (default) | stream

For streaming mode details, see Configuration.

@your-bot /clone https://github.com/user/repo

Reply in the thread created by the initial message:

@your-bot /status
@your-bot /worktree feature-branch

You can also DM the bot directly — no @mention needed:

/help
  1. Check that Socket Mode is enabled
  2. Verify both tokens are correct in .env
  3. Check the app logs for errors
  4. Ensure the bot is invited to the channel
  5. Make sure you’re @mentioning the bot (not just typing)

The bot needs to be invited to the channel:

/invite @your-bot

Add the required scope in OAuth & Permissions and reinstall the app.

Ensure these scopes are added:

  • channels:history (public channels)
  • groups:history (private channels)
  1. Use User Whitelist: Set SLACK_ALLOWED_USER_IDS to restrict bot access
  2. Private Channels: Invite the bot only to channels where it’s needed
  3. Token Security: Never commit tokens to version control