介面

Telegram 閘道

一個將 Telegram 訊息路由至 Hermes 對話的行動控制介面。

Telegram 閘道

這是什麼

一個將 Telegram 訊息路由至 Hermes 對話的行動控制介面。

白話解釋

想像一條直接連接郵件處理中心的電話線,但它還能分出私人分機——Telegram 的「話題」功能——因此一個人可以擁有個人助理的私密頻道,而團隊則共享一個工作對話,所有內容都流向同一個 Hermes。Telegram 閘道就是那條線:你在手機上打字,訊息就會抵達你的 agent。

為什麼重要

Telegram 是「我在哪裡都能與我的 agent 交談」最受歡迎的介面,尤其是在亞洲市場,那裡的 LINE 和微信生態系使 Telegram 成為跨平台自動化的實際選擇。一個設定在群組中的 bot 可以讓整個團隊查詢同一個 Hermes 實例,而「話題」功能讓個人訊息和工作討論串在一個統一的 gateway 連線下保持隔離。對於 gateway 行動命令中心工作流程——檢查 cron 任務、讀取儀表板、觸發研究——Telegram 的低延遲和推播通知使其成為預設的遠端控制介面。

How it works

TelegramAdapter connects through python-telegram-ptb’s Application class, registered with a bot token and an optional list of allowed_chat_ids for access control (plugins/platforms/telegram/adapter.py). When a message arrives from an allowed chat — or from any chat if the list is empty — it passes through message parsing, attachment handling, and thread-aware session routing. The adapter respects Telegram’s threading model: each top-level message and its reply chain become a single Hermes session, with topic groups further scoped by topic_id for group chats that have them enabled.