Skip to content

Channels CLI

Manage channel connections for messaging platforms through the CLI.

Overview

Channels allow your agents to interact through messaging platforms:

bash
moxxy channel <type> [options]

Available Channels

ChannelStatusDescription
Telegram✅ StableFull bot support with voice messages
Discord✅ StableBot integration
Slack🟡 BetaApp integration
WhatsApp🟡 BetaBridge via third-party

Telegram Setup

Prerequisites

  1. Create a bot via @BotFather on Telegram
  2. Save the bot token you receive

Connect Command

bash
moxxy channel telegram --agent <name> [--token <token>] [--pair-code <code>]

Step-by-Step

  1. Start the setup:

    bash
    moxxy channel telegram --agent default
  2. Enter your bot token:

    ? Enter your bot token (from @BotFather): 123456789:ABCdefGHIjklMNOpqrsTUVwxyz
  3. Start your bot on Telegram:

    • Open Telegram
    • Find your bot
    • Send /start
  4. Enter the pairing code:

    ? Pairing code: 123456
  5. Done! Your agent is now connected to Telegram.

Bot Commands

Users can send these commands to your bot:

CommandDescription
/startPair with the bot
/skillsList available skills
/newClear conversation memory

Voice Messages

Voice messages are automatically transcribed using OpenAI Whisper.

Configure the Whisper model:

bash
moxxy run --agent default --prompt "Store 'whisper-1' in vault as whisper_model"

Telegram Options

OptionDescription
--agent, -aAgent to connect (default: "default")
--tokenBot token (will prompt if omitted)
--pair-code, -c6-digit pairing code

Discord Setup

Prerequisites

  1. Create a Discord application at Discord Developer Portal
  2. Create a bot user
  3. Generate a bot token
  4. Invite the bot to your server with appropriate permissions

Connect Command

bash
moxxy channel discord --agent <name> --token <token>

Permissions Required

  • Send Messages
  • Read Message History
  • Mention Everyone (optional)
  • Connect (for voice)

Usage

Mention the bot to trigger a response:

@MyBot What's the weather today?

Slack Setup

Prerequisites

  1. Create a Slack App at api.slack.com
  2. Configure OAuth scopes: app_mentions:read, chat:write, im:history
  3. Install to workspace
  4. Get the Bot User OAuth Token

Connect Command

bash
moxxy channel slack --agent <name> --token <token> --app-token <app-level-token>

Configuration

Store Slack credentials:

bash
moxxy run --agent default --prompt "Store 'xoxb-xxx' in vault as slack_bot_token"
moxxy run --agent default --prompt "Store 'xapp-xxx' in vault as slack_app_token"

Usage

Mention the bot in any channel:

@Moxxy Help me with this task

WhatsApp Setup

WhatsApp integration uses a bridge approach with Baileys or similar.

Prerequisites

  • A phone number for the bot
  • QR code scanning capability

Connect Command

bash
moxxy channel whatsapp --agent <name>

The terminal will display a QR code to scan with your phone.

Limitations

  • Not officially supported by WhatsApp/Meta
  • May require re-pairing periodically
  • Use with appropriate caution

Managing Channels

View Connected Channels

bash
moxxy gateway status

Disconnect a Channel

Remove the channel credentials from the vault:

bash
moxxy run --agent default --prompt "Remove telegram_token from vault"

Then restart the gateway:

bash
moxxy gateway restart

Multiple Agents, Multiple Channels

Each agent can have its own channel connections:

bash
# Agent 1 → Telegram
moxxy channel telegram --agent assistant

# Agent 2 → Discord  
moxxy channel discord --agent researcher

# Agent 3 → Slack
moxxy channel slack --agent support

Channel-Specific Behaviors

Rate Limiting

Channels implement rate limiting to avoid being blocked:

ChannelRate Limit
Telegram30 messages/second
Discord50 requests/second
Slack1 message/channel/second

Message Formatting

The agent adapts its output format per channel:

ChannelFormatting
TelegramMarkdown + HTML
DiscordMarkdown + Embeds
Slackmrkdwn + Blocks
WhatsAppPlain text

File Handling

ChannelSend FilesReceive Files
Telegram
Discord
Slack
WhatsApp🟡🟡

Troubleshooting

Bot Not Responding

  1. Check gateway status:

    bash
    moxxy gateway status
  2. Check logs:

    bash
    moxxy logs | grep -i telegram
  3. Verify token:

    bash
    moxxy run --agent default --prompt "What is my telegram_token?"

Pairing Failed

For Telegram, ensure:

  • You sent /start to the bot
  • You're using the correct 6-digit code
  • The code hasn't expired (5-minute window)

Rate Limited

If you see rate limit errors:

  • Reduce message frequency
  • Implement delays between messages
  • Check channel-specific rate limits

Token Invalid

Regenerate the token from the platform's developer console and update the vault:

bash
moxxy run --agent default --prompt "Store 'NEW_TOKEN' in vault as telegram_token"
moxxy gateway restart

Open source · Self-hosted · Data sovereign