Telegram bot setup
The team-bot binary is the first interface adapter — it connects a Telegram chat to the teamctl mailbox so you can DM managers and approve sensitive actions.
Prerequisites
- Create a bot via @BotFather. Save the token.
- Find your Telegram chat id — send any message to @userinfobot. It’s a number.
Configuration
interfaces: - type: telegram name: tg-main config: bot_token_env: TEAMCTL_TELEGRAM_TOKEN authorized_chat_ids: [75473051]Then export the token and start the bot:
export TEAMCTL_TELEGRAM_TOKEN="123456:AAH…"export TEAMCTL_TELEGRAM_CHATS="75473051"team-bot --mailbox ./state/mailbox.db(An interactive teamctl bot setup wraps this in one command.)
What the bot does
- Forwards manager messages. Any message addressed to an agent with
telegram_inbox: trueis sent to the authorized chat. - Surfaces approvals. New pending
request_approvalrows appear with Approve / Deny inline buttons. - Accepts commands:
/dm <project>:<agent> <text>— send a message into the mailbox./pending— list pending approvals./help— this help.
Security
- Messages from chat ids not in
authorized_chat_idsare silently dropped and logged. - Approval callbacks are rejected the same way.
- The bot never calls Telegram from anywhere but a manager-addressed message or an approval — it is not a general-purpose notifier.