Reach out
Channels
A channel lets you talk to your crew from outside the terminal. Brigade defines a typed channel-adapter contract and a shared inbound pipeline. Two adapters ship today — WhatsApp (the reference implementation) and Telegram.
The inbound pipeline#
Every channel adapter feeds the same inbound pipeline, so the safety properties are identical no matter where a message comes from:
- Access control — only allowed senders reach an agent.
- Dedupe — duplicate deliveries are dropped.
- Abort triggers — a message can stop an in-flight turn.
- Approval routing — privileged actions surface back to the owner for sign-off.
Inbound messages resolve to an (agent, session)pair through the same routing the TUI uses, and memory is origin-scoped, so one peer never bleeds into another's context. See Memory and Agents & isolation.
WhatsApp#
The WhatsApp adapter pairs over QR or code, supports multiple accounts, and is built to stay connected: reconnect with exponential backoff and jitter, a presence ping that keeps the device marked online so queued messages are not dropped, and crypto/session-error narrowing that resets a broken session cleanly.
$ brigade channels list$ brigade channels link --channel whatsapp # pair via QR / code$ brigade channels status --channel whatsapp$ brigade channels allow list --channel whatsapp # who may message this crew$ brigade channels disable --channel whatsappAllowlists & pairing#
A channel only talks to senders on its allowlist. Pending pairing requests are reviewed and approved explicitly:
$ brigade channels allow add --channel whatsapp$ brigade pairing list --channel whatsapp$ brigade pairing approve --channel whatsapp <code>$ brigade pairing revoke --channel whatsapp <code>Telegram#
Telegram is a full second adapter on the same inbound pipeline, allowlist, and routing as WhatsApp. The difference is how you connect it: instead of pairing a phone over QR, you point Brigade at a bot token from @BotFather. Create a bot, copy its token, and add it:
$ brigade channels add --channel telegram # paste a @BotFather token$ brigade channels status --channel telegram$ brigade channels allow add --channel telegram # allow a Telegram username$ brigade channels disable --channel telegramIt is inert until enabled and a token resolves. Configure it in brigade.json with a single bot or several, and keep the token out of the file with a ${VAR} reference:
{ "channels": { "telegram": { "enabled": true, "accounts": [ { "id": "main", "botToken": "${TELEGRAM_BOT_TOKEN}" }, { "id": "ops", "botToken": "${TELEGRAM_OPS_TOKEN}" } ] } }}What it does:
- Text & media — sends chunked text (markdown rendered to Telegram HTML) and uploads/forwards media; inbound media rides through to the agent.
- Multiple accounts — run several bots, each its own account id, bound to different agents.
- Allowlist by username — only the Telegram usernames you allow reach your crew.
- Resilient polling — long-poll updates with backoff, plus narrowing for an unauthorized (revoked) token and for a conflicting second consumer of the same bot, with the token redacted from logs.
Routing to an agent#
Bind a channel account to the agent that should answer it. A binding spec is "<channel>" or "<channel>:<accountId>":
$ brigade agents bind --agent support --bind "whatsapp:work"$ brigade agents bind --agent ops --bind "telegram:ops"More channels