Activation: token-presence, not a flag
Channels auto-start as soon as the mesh resolves a usable token. There is no separateenabled: true flag — drop a token in and the channel comes up on next openlegion start. The mesh looks for each channel’s bot token in this order:
OPENLEGION_SYSTEM_<NAME>(mesh-tier env)OPENLEGION_CRED_<NAME>(agent-tier env)- Bare env (e.g.,
TELEGRAM_BOT_TOKEN) mesh.yamlchannels.<name>.bot_token
Pairing
On startup, each active channel prints a one-time pairing code to the console. Send/start <code> from your account in that channel to claim the channel — the first user to pair becomes the channel owner. After pairing, the channel persists the owner mapping (e.g., config/telegram_paired.json for Telegram).
Supported Channels
Channel Configuration
API tokens are stored as environment variables:channels.<name> in config/mesh.yaml:
WhatsApp caveats
WhatsApp is the channel with the most operational gotchas:- Graph v21.0 Cloud API only.
- Text-only. Inbound non-text messages (images, audio, documents, stickers, locations) are dropped — the agent never sees them.
WHATSAPP_APP_SECRETis required in production. The webhook handler verifies inbound payloads with HMAC-SHA256. IfMESH_AUTH_TOKENis set andWHATSAPP_APP_SECRETis missing, the channel raisesRuntimeErrorat startup — it will not silently run unauthenticated.- The verify token regenerates on every restart unless you set
OPENLEGION_SYSTEM_WHATSAPP_VERIFY_TOKENexplicitly. Set it so your Meta-side webhook config stays stable.
Channel Commands
These commands work across all channels (CLI commands are documented in the CLI Reference):
CLI-only commands (not available in messaging channels):
/add, /agent, /remove, /restart, /history, /blackboard, /queue, /cron, /project, /credential, /removekey, /logs, /traces (alias /debug).
Per-channel routing semantics
Routing semantics differ slightly per channel:- Telegram / Discord: per-user. Each user’s messages route to the agent they’ve
/use-d. - Slack: composite
user_id:thread_ts. The same user gets a separate active-agent per thread. - WhatsApp: per-user, keyed on phone number.
- CLI: single-user (the REPL session itself).
