Agent MessengerAgent Messenger
Integrations

Slack Bot

Complete reference for the agent-slackbot CLI.

Tip: agent-slackbot uses bot tokens (xoxb-) instead of user tokens. Ideal for server-side and CI/CD integrations.

Quick Start

# 1. Set your bot token (from api.slack.com/apps)
agent-slackbot auth set xoxb-your-bot-token

# 2. Verify authentication
agent-slackbot auth status

# 3. Send a message
agent-slackbot message send C0ACZKTDDC0 "Hello from bot!"

Authentication

Create a Slack App

The fastest way to get started is to create an app from the manifest below:

  1. Go to api.slack.com/appsCreate New AppFrom an app manifest
  2. Select your workspace
  3. Paste the manifest below (choose YAML tab) and click NextCreate
  4. Click Install App in the left sidebar, then hit Install to Workspace
  5. Copy the Bot User OAuth Token (starts with xoxb-) from the Install App page
display_information:
  name: Agent Messenger Bot
  description: Bot for agent-messenger CLI integration
  background_color: "#1a1a2e"

features:
  bot_user:
    display_name: agent-messenger
    always_online: false

oauth_config:
  scopes:
    bot:
      - chat:write
      - channels:history
      - channels:read
      - channels:join
      - groups:history
      - groups:read
      - users:read
      - users:read.email
      - reactions:write
      - reactions:read

settings:
  org_deploy_enabled: false
  socket_mode_enabled: false
  token_rotation_enabled: false

Then set the token:

# Basic setup
agent-slackbot auth set xoxb-your-bot-token

# Or with a custom bot identifier for multi-bot setups
agent-slackbot auth set xoxb-your-bot-token --bot deploy --name "Deploy Bot"

# Verify it works
agent-slackbot auth status

Authentication Commands

# Check bot auth status
agent-slackbot auth status

# Clear all stored credentials
agent-slackbot auth clear

Multi-Bot Support

Store multiple bot tokens and switch between them:

# Add multiple bots
agent-slackbot auth set xoxb-deploy-token --bot deploy --name "Deploy Bot"
agent-slackbot auth set xoxb-alert-token --bot alert --name "Alert Bot"

# List all stored bots
agent-slackbot auth list

# Switch active bot
agent-slackbot auth use deploy

# Use a specific bot for one command (without switching)
agent-slackbot message send C0ACZKTDDC0 "Alert!" --bot alert

# Remove a stored bot
agent-slackbot auth remove deploy

Scopes Reference

ScopeUsed For
chat:writeSending and updating messages
channels:historyReading public channel messages
channels:readListing public channels
channels:joinJoining public channels
groups:historyReading private channel messages
groups:readListing private channels
users:readListing users
users:read.emailReading user emails
reactions:writeAdding/removing reactions
reactions:readListing reactions

Environment Variables (CI/CD)

export E2E_SLACKBOT_TOKEN=xoxb-your-bot-token
export E2E_SLACKBOT_WORKSPACE_ID=T123456
export E2E_SLACKBOT_WORKSPACE_NAME="My Workspace"

Commands

Message Commands

# Send a message
agent-slackbot message send <channel> <text>
agent-slackbot message send C0ACZKTDDC0 "Hello world"

# Send a threaded reply
agent-slackbot message send C0ACZKTDDC0 "Reply" --thread <ts>

# List messages
agent-slackbot message list <channel>
agent-slackbot message list C0ACZKTDDC0 --limit 50

# Get a single message
agent-slackbot message get <channel> <ts>

# Get thread replies
agent-slackbot message replies <channel> <thread_ts>
agent-slackbot message replies C0ACZKTDDC0 1234567890.123456

# Update a message (bot's own messages only)
agent-slackbot message update <channel> <ts> <new-text>

# Delete a message (bot's own messages only)
agent-slackbot message delete <channel> <ts> --force

Channel Commands

# List channels
agent-slackbot channel list
agent-slackbot channel list --limit 50

# Get channel info
agent-slackbot channel info <channel>
agent-slackbot channel info C0ACZKTDDC0

User Commands

# List users
agent-slackbot user list
agent-slackbot user list --limit 50

# Get user info
agent-slackbot user info <user-id>

Reaction Commands

# Add reaction
agent-slackbot reaction add <channel> <ts> <emoji>
agent-slackbot reaction add C0ACZKTDDC0 1234567890.123456 thumbsup

# Remove reaction
agent-slackbot reaction remove <channel> <ts> <emoji>

Key Differences from agent-slack

Featureagent-slackagent-slackbot
Token typeUser token (xoxc-)Bot token (xoxb-)
Token sourceAuto-extracted from desktop appManual from Slack App config
Message searchYesNo
File operationsYesNo
SnapshotYesNo
Edit/delete messagesAny messageBot's own only
Multi-bot supportN/AYes (--bot flag)
CI/CD friendlyRequires desktop appYes

AI Agent Integration

See skills/agent-slackbot/ for:

  • Complete skill documentation
  • Runnable templates
  • Common patterns for AI agents

On this page