Channels CLI
Manage channel connections for messaging platforms through the CLI.
Overview
Channels allow your agents to interact through messaging platforms:
moxxy channel <type> [options]Available Channels
| Channel | Status | Description |
|---|---|---|
| Telegram | ✅ Stable | Full bot support with voice messages |
| Discord | ✅ Stable | Bot integration |
| Slack | 🟡 Beta | App integration |
| 🟡 Beta | Bridge via third-party |
Telegram Setup
Prerequisites
- Create a bot via @BotFather on Telegram
- Save the bot token you receive
Connect Command
moxxy channel telegram --agent <name> [--token <token>] [--pair-code <code>]Step-by-Step
Start the setup:
bashmoxxy channel telegram --agent defaultEnter your bot token:
? Enter your bot token (from @BotFather): 123456789:ABCdefGHIjklMNOpqrsTUVwxyzStart your bot on Telegram:
- Open Telegram
- Find your bot
- Send
/start
Enter the pairing code:
? Pairing code: 123456Done! Your agent is now connected to Telegram.
Bot Commands
Users can send these commands to your bot:
| Command | Description |
|---|---|
/start | Pair with the bot |
/skills | List available skills |
/new | Clear conversation memory |
Voice Messages
Voice messages are automatically transcribed using OpenAI Whisper.
Configure the Whisper model:
moxxy run --agent default --prompt "Store 'whisper-1' in vault as whisper_model"Telegram Options
| Option | Description |
|---|---|
--agent, -a | Agent to connect (default: "default") |
--token | Bot token (will prompt if omitted) |
--pair-code, -c | 6-digit pairing code |
Discord Setup
Prerequisites
- Create a Discord application at Discord Developer Portal
- Create a bot user
- Generate a bot token
- Invite the bot to your server with appropriate permissions
Connect Command
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
- Create a Slack App at api.slack.com
- Configure OAuth scopes:
app_mentions:read,chat:write,im:history - Install to workspace
- Get the Bot User OAuth Token
Connect Command
moxxy channel slack --agent <name> --token <token> --app-token <app-level-token>Configuration
Store Slack credentials:
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 taskWhatsApp Setup
WhatsApp integration uses a bridge approach with Baileys or similar.
Prerequisites
- A phone number for the bot
- QR code scanning capability
Connect Command
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
moxxy gateway statusDisconnect a Channel
Remove the channel credentials from the vault:
moxxy run --agent default --prompt "Remove telegram_token from vault"Then restart the gateway:
moxxy gateway restartMultiple Agents, Multiple Channels
Each agent can have its own channel connections:
# Agent 1 → Telegram
moxxy channel telegram --agent assistant
# Agent 2 → Discord
moxxy channel discord --agent researcher
# Agent 3 → Slack
moxxy channel slack --agent supportChannel-Specific Behaviors
Rate Limiting
Channels implement rate limiting to avoid being blocked:
| Channel | Rate Limit |
|---|---|
| Telegram | 30 messages/second |
| Discord | 50 requests/second |
| Slack | 1 message/channel/second |
Message Formatting
The agent adapts its output format per channel:
| Channel | Formatting |
|---|---|
| Telegram | Markdown + HTML |
| Discord | Markdown + Embeds |
| Slack | mrkdwn + Blocks |
| Plain text |
File Handling
| Channel | Send Files | Receive Files |
|---|---|---|
| Telegram | ✅ | ✅ |
| Discord | ✅ | ✅ |
| Slack | ✅ | ✅ |
| 🟡 | 🟡 |
Troubleshooting
Bot Not Responding
Check gateway status:
bashmoxxy gateway statusCheck logs:
bashmoxxy logs | grep -i telegramVerify token:
bashmoxxy run --agent default --prompt "What is my telegram_token?"
Pairing Failed
For Telegram, ensure:
- You sent
/startto 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:
moxxy run --agent default --prompt "Store 'NEW_TOKEN' in vault as telegram_token"
moxxy gateway restart