Agent Messenger
Integrations

Slack

Complete reference for the agent-slack CLI.

Tip: agent-slack is a shortcut for agent-messenger slack.

Quick Start

# 1. Extract credentials from Slack desktop app (zero-config!)
agent-slack auth extract

# 2. Get workspace snapshot
agent-slack snapshot

# 3. Send a message
agent-slack message send general "Hello from AI agent!"

Authentication

Seamless Token Extraction

agent-slack automatically extracts your Slack credentials from the desktop app:

agent-slack auth extract

# Use --debug for troubleshooting
agent-slack auth extract --debug

This command:

  • Auto-detects your platform (macOS/Linux/Windows)
  • Supports both direct download and App Store versions on macOS
  • Extracts xoxc token and xoxd cookie
  • Validates tokens against Slack API
  • Discovers ALL logged-in workspaces
  • Stores credentials securely in ~/.config/agent-messenger/

Multi-Workspace Management

# List all authenticated workspaces
agent-slack workspace list

# Switch to a different workspace
agent-slack workspace switch <workspace-id>

# Show current workspace
agent-slack workspace current

# Check auth status
agent-slack auth status

Commands

Message Commands

# Send a message
agent-slack message send <channel> <text>
agent-slack message send general "Hello world"

# Send a threaded reply
agent-slack message send general "Reply" --thread <ts>

# List messages
agent-slack message list <channel>
agent-slack message list general --limit 50

# Search messages across workspace
agent-slack message search <query>
agent-slack message search "project update" --limit 50

# Update a message
agent-slack message update <channel> <ts> <new-text>

# Delete a message
agent-slack message delete <channel> <ts> --force

Channel Commands

# List channels (excludes archived by default)
agent-slack channel list
agent-slack channel list --type public
agent-slack channel list --include-archived

# Get channel info
agent-slack channel info <channel>
agent-slack channel info general

User Commands

# List users
agent-slack user list
agent-slack user list --include-bots

# Get user info
agent-slack user info <user>

# Get current user
agent-slack user me

Reaction Commands

# Add reaction
agent-slack reaction add <channel> <ts> <emoji>
agent-slack reaction add general 1234567890.123456 thumbsup

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

# List reactions
agent-slack reaction list <channel> <ts>

File Commands

# Upload file
agent-slack file upload <channel> <path>
agent-slack file upload general ./report.pdf

# List files
agent-slack file list
agent-slack file list --channel general

# Get file info
agent-slack file info <file-id>

Snapshot Command

Get comprehensive workspace state for AI agents:

# Full snapshot
agent-slack snapshot

# Filtered snapshots
agent-slack snapshot --channels-only
agent-slack snapshot --users-only

# Limit messages per channel
agent-slack snapshot --limit 10

AI Agent Integration

See skills/agent-messenger/ directory for:

  • Complete skill documentation
  • Runnable templates

On this page