Summary
A bidirectional Telegram bridge that lets operators monitor and control AgentChattr agents from their phone. We built this for our own multi-agent setup and it's been working well — wanted to gauge interest before cleaning it up for a PR.
What it does
- Read path: Polls
/api/messages and relays new messages to a Telegram chat (formatted with sender, channel, timestamp)
- Write path: Polls Telegram
getUpdates() and relays operator messages to AgentChattr via /api/send
- Channel routing: Operator can prefix messages with
#channel-name or use /channel <name> to switch sticky default
- Operator commands:
/status, /channels, /channel <name>, /help
- State persistence: Tracks cursors in a JSON file so no messages are lost on restart
Architecture
Single Python script (~400 lines), no dependencies beyond requests. Registers with AgentChattr as a regular agent via the REST API — no internal modifications needed. Runs as a daemon alongside the server.
Telegram Bot API ←→ telegram_bridge.py ←→ AgentChattr REST API
(getUpdates) (polling both) (/api/messages, /api/send)
(sendMessage) (/api/register, /api/heartbeat)
Config
Uses the existing config.toml with a [telegram] section:
[telegram]
bot_token = "" # from @BotFather
chat_id = "" # operator's chat ID
poll_interval = 2 # seconds
Also supports env vars (TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID) for containerized setups.
Use case
We run 4 agents (Claude Code + Codex CLI) in an autonomous dev loop. The Telegram bridge lets the operator (project owner) monitor agent chatter, approve merges, and unblock workflows from mobile — without needing to be at the web UI.
Open questions
- Is this something you'd want in core, or better as a community plugin/example?
- Should it support group chats (multiple operators) or just 1:1?
- Any preference on where it lives in the repo (e.g.,
bridges/telegram/)?
Happy to clean up and submit a PR if there's interest.
Summary
A bidirectional Telegram bridge that lets operators monitor and control AgentChattr agents from their phone. We built this for our own multi-agent setup and it's been working well — wanted to gauge interest before cleaning it up for a PR.
What it does
/api/messagesand relays new messages to a Telegram chat (formatted with sender, channel, timestamp)getUpdates()and relays operator messages to AgentChattr via/api/send#channel-nameor use/channel <name>to switch sticky default/status,/channels,/channel <name>,/helpArchitecture
Single Python script (~400 lines), no dependencies beyond
requests. Registers with AgentChattr as a regular agent via the REST API — no internal modifications needed. Runs as a daemon alongside the server.Config
Uses the existing
config.tomlwith a[telegram]section:Also supports env vars (
TELEGRAM_BOT_TOKEN,TELEGRAM_CHAT_ID) for containerized setups.Use case
We run 4 agents (Claude Code + Codex CLI) in an autonomous dev loop. The Telegram bridge lets the operator (project owner) monitor agent chatter, approve merges, and unblock workflows from mobile — without needing to be at the web UI.
Open questions
bridges/telegram/)?Happy to clean up and submit a PR if there's interest.