Channel Commands
Channels connect OpenFang agents to external messaging platforms like Telegram, Discord, Slack, and more. All channel commands are under theopenfang channel namespace.
Listing Channels
openfang channel list
List configured channels and their status.- Ready ✓ - Channel is configured and credentials are valid
- Missing env ⚠ - Channel is configured in
config.tomlbut environment variable is not set - Not configured ✗ - Channel has not been set up
The
webchat channel is built-in and always available via the web dashboard.Setting Up Channels
openfang channel setup
Interactive setup wizard for a channel integration.
Supported Channels:
telegram- Telegram botsdiscord- Discord botsslack- Slack appswhatsapp- WhatsApp Business APIemail- SMTP emailsignal- Signal messengermatrix- Matrix protocol
Telegram Setup
Discord Setup
Slack Setup
WhatsApp Setup
Email Setup
Testing Channels
openfang channel test
Send a test message through a configured channel.
Requirements:
- Daemon must be running
- Channel must be configured and enabled
- Timestamp
- OpenFang version
- Confirmation that the channel is working
If the test fails, check the daemon logs:
openfang logs or ~/.openfang/tui.logEnabling & Disabling Channels
openfang channel enable
Enable a configured channel.openfang channel disable
Disable a channel without removing its configuration.Disabling a channel keeps all configuration and credentials. The channel can be re-enabled without re-entering credentials.
Channel Configuration Reference
Telegram
TELEGRAM_BOT_TOKEN- Bot token from @BotFather
Discord
DISCORD_BOT_TOKEN- Bot token from Discord Developer Portal
Slack
SLACK_BOT_TOKEN- Bot User OAuth Token (starts withxoxb-)
WhatsApp (Twilio)
WHATSAPP_ACCOUNT_SID- Twilio Account SIDWHATSAPP_AUTH_TOKEN- Twilio Auth Token
Email (SMTP)
SMTP_USERNAME- Email addressSMTP_PASSWORD- Email password or app-specific password
Using Channels with Agents
Once configured, agents can automatically respond to messages from channels.Agent Channel Binding
Bind an agent to specific channels in its manifest:Message Flow
- User sends message via Telegram/Discord/Slack
- Channel adapter receives message and forwards to daemon
- Agent processes the message
- Response sent back through the same channel
Example Telegram Interaction
Invalid Token Error
- Re-run setup:
openfang channel setup telegram - Or manually edit
~/.openfang/.envwith the correct token - Restart daemon:
openfang stop && openfang start
Permission Denied
- Go to Discord Developer Portal
- Bot → Privileged Gateway Intents → Enable MESSAGE CONTENT INTENT
- Reinvite bot with correct permissions
- Go to api.slack.com/apps
- OAuth & Permissions → Add missing scopes
- Reinstall app to workspace
Channel Webhook Not Found
- Verify bot is in the channel/server
- Check channel ID is correct
- For Discord: Bot needs “View Channel” permission
Advanced Configuration
Multi-Agent Channel Routing
Route different channels to different agents:Rate Limiting
Configure per-channel rate limits:Message Formatting
Customize message formatting per channel:Next Steps
Workflow Commands
Automate multi-step tasks
Channel Adapters
Learn about channel architecture