调查日期:2026-06-29 · 数据来源:Hermes Agent 官方文档、GitHub 源码仓库
Hermes Agent 的通道系统分为两个层级:核心内置通道(24个,在 gateway/config.py 的 Platform 枚举中硬编码)和 插件扩展通道(7个,通过 plugins/platforms/ 目录自动发现)。插件通道通过 PEP 562 __getattr__ 机制实现延迟加载,按需导入,零额外启动开销。
| # | 通道名称 | 类型 | 适配器位置 | 连接方式 | 核心特性 |
|---|---|---|---|---|---|
| 1 | Telegram | 核心 | gateway/platforms/telegram.py |
Polling / Webhook | Voice · Images · Files · Threads · Streaming · Cron · MEDIA tag · Groups |
| 2 | Discord | 核心 | plugins/platforms/discord/ |
WebSocket (Gateway Intents) | Voice Channel · Reactions · Threads · Streaming · Typing · Slash Commands |
| 3 | Slack | 核心 | plugins/platforms/slack/ |
Socket Mode / Webhook | Reactions · Threads · Streaming · Blocks · Slash Commands · Files |
| 4 | WhatsApp (Baileys) | 核心 | gateway/platforms/whatsapp.py |
WebSocket (Baileys bridge) | QR pairing · Voice notes · Images · Files · Streaming · No Meta dev account |
| 5 | WhatsApp Cloud | 核心 | gateway/platforms/whatsapp_cloud.py |
Webhook (Meta Cloud API) | Production-grade · Interactive buttons · Read receipts · HMAC security · No QR |
| 6 | Signal | 核心 | gateway/platforms/signal.py |
SSE + JSON-RPC (signal-cli) | E2E encrypted · Native formatting · Reactions · Reply quotes · 100MB files |
| 7 | Matrix | 核心 | plugins/platforms/matrix/ |
WebSocket (Matrix Client-Server) | Federated protocol · E2E rooms · Reactions · Threads · Streaming |
| 8 | Mattermost | 核心 | plugins/platforms/mattermost/ |
WebSocket | Self-hosted · Threads · Streaming · Typing · Files |
| 9 | 核心 | plugins/platforms/email/ |
SMTP / IMAP | Threading via In-Reply-To · Attachments · Plain text + HTML · No streaming | |
| 10 | SMS (Twilio) | 核心 | plugins/platforms/sms/ |
Webhook (Twilio API) | 160-char SMS segments · HMAC-SHA1 signature · E.164 numbers · No encryption |
| 11 | Google Chat | 插件 | plugins/platforms/google_chat/ |
Google Pub/Sub + REST | Google Workspace · Threads · Typing · Images · Files · OAuth setup |
| 12 | IRC | 插件 | plugins/platforms/irc/ |
TCP/TLS (asyncio stdlib) | Zero dependencies · NickServ auth · Libera.Chat · Plain text only · 450-char limit |
| 13 | LINE | 插件 | plugins/platforms/line/ |
Webhook (LINE Messaging API) | Japan/Asia · Template buttons · Postback · Stickers · Location · 60s reply window |
| 14 | ntfy.sh | 插件 | plugins/platforms/ntfy/ |
HTTP SSE (pub-sub) | Mobile push · Outgoing-only mode · Markdown · Self-hostable · No auth identity |
| 15 | SimpleX Chat | 插件 | plugins/platforms/simplex/ |
WebSocket (local daemon) | No user IDs · E2E encrypted · Decentralized · Auto-accept contacts · Attachments |
| 16 | Feishu / Lark | 核心 | plugins/platforms/feishu/ |
WebSocket / Webhook | Scan-to-create · Interactive cards · Reactions · Threads · Streaming · @mentions |
| 17 | DingTalk | 核心 | plugins/platforms/dingtalk/ |
WebSocket / Webhook | Alibaba enterprise · @mentions · Files · Images · Voice |
| 18 | WeCom | 核心 | plugins/platforms/wecom/ |
WebSocket (AI Bot gateway) | Scan-to-create · AES media decryption · No public URL needed · Groups |
| 19 | WeCom Callback | 核心 | gateway/platforms/wecom_callback.py |
Webhook (inbound callback) | Alternative WeCom mode · Requires public URL · XML payloads |
| 20 | Weixin (微信) | 核心 | gateway/platforms/weixin.py |
WebSocket / HTTP | Personal WeChat · Streaming · Typing · Images · Files · Voice |
| 21 | QQ Bot | 核心 | gateway/platforms/qqbot/ |
WebSocket (QQ Bot SDK) | Tencent QQ · Groups · Files · Images · Voice · Streaming |
| 22 | Yuanbao (元宝) | 核心 | gateway/platforms/yuanbao.py |
WebSocket | Tencent AI · Groups · @mentions · Images · Streaming · SSRF guarded |
| 23 | BlueBubbles | 核心 | gateway/platforms/bluebubbles.py |
WebSocket (BlueBubbles server) | iMessage bridge (legacy) · Reactions · Typing · Requires Mac relay |
| 24 | Photon | 插件 | plugins/platforms/photon/ |
WebSocket | iMessage bridge v2 · No Mac relay · Successor to BlueBubbles · hermes photon setup |
| 25 | API Server | 核心 | gateway/platforms/api_server.py |
HTTP REST | OpenAI-compatible · /v1/chat/completions · /v1/responses · Sessions API |
| 26 | Webhook | 核心 | gateway/platforms/webhook.py |
HTTP POST | GitHub/GitLab/JIRA/Stripe · HMAC validation · Payload templates · Route config |
| 27 | MSGraph Webhook | 核心 | gateway/platforms/msgraph_webhook.py |
Microsoft Graph Webhook | Teams notifications · Outlook integration · OAuth subscription lifecycle |
| 28 | Home Assistant | 核心 | plugins/platforms/homeassistant/ |
WebSocket (HASS API) | Smart home · Entity control · No media/file support · Conversation agent |
| 29 | Local | 核心 | 内置 (CLI/TUI) | stdin/stdout | CLI · TUI · Desktop app · Full tool access · No network needed |
| 30 | Raft | 插件 | plugins/platforms/raft/ |
Agent-to-agent protocol | Multi-agent networking · Inter-agent messaging · Experimental |
| 31 | Relay | 实验 | gateway/platforms/relay.py |
Generic connector relay | Experimental · Generic relay adapter fronted by external connector |
以下数据提取自官方文档 Messaging Gateway 页面。
| 通道 | 语音 | 图片 | 文件 | 话题 | 表情 | 输入中 | 流式 |
|---|---|---|---|---|---|---|---|
| Telegram | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
| Discord | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Slack | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Google Chat | — | ✓ | ✓ | ✓ | — | ✓ | — |
| WhatsApp (both) | — | ✓ | ✓ | — | — | ✓ | ✓ |
| Signal | — | ✓ | ✓ | — | — | ✓ | ✓ |
| — | ✓ | ✓ | ✓ | — | — | — | |
| Mattermost | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
| Matrix | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Feishu / Lark | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| WeCom | ✓ | ✓ | ✓ | — | — | — | — |
| Weixin | ✓ | ✓ | ✓ | — | — | ✓ | ✓ |
| BlueBubbles | — | ✓ | ✓ | — | ✓ | ✓ | — |
| ✓ | ✓ | ✓ | — | — | ✓ | — | |
| Yuanbao | ✓ | ✓ | ✓ | — | — | ✓ | ✓ |
| Microsoft Teams | — | ✓ | — | ✓ | — | ✓ | — |
| LINE | — | ✓ | ✓ | — | — | ✓ | — |
注:SMS、Home Assistant、WeCom Callback、ntfy、Raft 不支持以上任何特性。IRC 仅纯文本。SimpleX 和 Photon 文档未列入此表但支持附件。
Telegram 是 Hermes 最成熟、功能最全的通道。支持 polling/webhook 双模式,streaming、voice transcription、cron delivery、群组管理一应俱全。Webhook 模式适用于 Fly.io / Railway 等云部署场景的 sleep-when-idle。适配器代码在 gateway/platforms/telegram.py,是参考实现的范本。
Discord 和 Slack 均已迁移至 plugins/platforms/ 插件架构。Discord 需配置 Message Content Intent 和 Privileged Gateway Intents。二者均支持 reactions、threads、streaming、typing indicator 和 slash commands。
WhatsApp 有两套独立适配器:
whatsapp):模拟 WhatsApp Web 会话,QR 码配对,零 Meta 账号,但有轻微封号风险。适合个人使用和测试。whatsapp_cloud):Meta Business 官方 API,需 Business 账号 + 公网 HTTPS webhook,原生 interactive buttons、已读回执、HMAC 签名验证。适合生产环境。Signal 依赖外部 signal-cli 守护进程(HTTP 模式),通过 SSE 接收消息、JSON-RPC 发送。需要实体手机号注册和 linked device 配对。支持原生格式化(bodyRanges)、reply quotes、reactions、100MB 文件、多图批量发送(32 张一批)。
Matrix 和 Mattermost 覆盖自托管/联邦化场景。Matrix 通过联邦协议天然支持跨服务器通信和 E2E 加密房间。
中国生态是 Hermes 通道体系中最密集的区域,涵盖9个通道:
| 通道 | 母公司 | 定位 | 特色 |
|---|---|---|---|
| Feishu / Lark | 字节跳动 | 企业协作 | Scan-to-create · Interactive Cards · WebSocket/Webhook 双模式 · 国内 Feishu / 国际 Lark |
| DingTalk | 阿里巴巴 | 企业协作 | WebSocket/Webhook · @mentions · 中国市场份额最大 |
| WeCom | 腾讯 | 企业微信 | AI Bot WebSocket 网关 · Scan-to-create · AES 媒体解密 · 无需公网 URL |
| WeCom Callback | 腾讯 | 企业微信(回调) | Webhook 入站模式 · XML 载荷 · 需公网 URL · 作为 WeCom 的替代方案 |
| Weixin | 腾讯 | 个人微信 | Streaming · Voice · Images · 支持群聊 |
| QQ Bot | 腾讯 | WebSocket SDK · Groups · Files · 懒加载(PEP 562)避免启动开销 | |
| Yuanbao | 腾讯 | 元宝 AI | WebSocket · Groups · @mentions · SSRF 安全加固 (PR #54470) |
| BlueBubbles | — | iMessage 桥接 | 旧版 · 需 Mac 中继服务器 · Reactions · Typing |
| Photon | — | iMessage 桥接 v2 | 新版 · 无需 Mac · hermes photon setup · BlueBubbles 继任者 |
ntfy.sh 是轻量级 HTTP pub-sub 方案。核心优势:零依赖(用 Hermes 已有的 httpx),手机端 app 即收即回,支持 outgoing-only 模式作为纯推送通道。安全提示:ntfy 没有原生用户认证——topic 名称即为身份。使用随机 topic 名或配置 token 保护。
Email 通过 SMTP/IMAP 连接,利用 In-Reply-To 头实现会话线程。无 streaming、无 typing、无 reactions,但附件支持完整。适用于异步、长周期对话场景。
SMS (Twilio) 需 Twilio 账号和公网 webhook URL。HMAC-SHA1 签名防伪造。160 字符分段。明文传输无加密,不适合敏感操作。
API Server 提供 OpenAI 兼容的 REST API(/v1/chat/completions、/v1/responses、/v1/runs),支持 X-Hermes-Session-Id 会话持久化和 X-Hermes-Session-Key 长期记忆作用域。Open WebUI 通过此适配器接入。
Webhook 接收 GitHub/GitLab/JIRA/Stripe 等外部服务的 POST 事件,经 HMAC 验证 + payload 模板转换后触发 agent run。结果可路由回源平台或任意配置的通道。
Home Assistant 通过 WebSocket 接入智能家居平台,使 Hermes 成为家庭语音/文字对话代理。
IRC 是 Hermes 最新加入的通道之一(适配器先于文档交付,PR #54254 补齐文档)。纯 Python asyncio 实现,零外部依赖。支持 Libera.Chat 等公共网络和自托管 ircd。NickServ 自动认证。纯文本,450 字符行限制。
SimpleX Chat 是目前隐私性最高的通道——无持久用户 ID、去中心化、端到端加密。需本地运行 simplex-chat 守护进程。
Raft 是实验性的 agent-to-agent 网络协议,用于多 agent 实例间的消息传递和协作。
Relay 是通用中继适配器(实验性),由外部 connector 驱动,面向未来自定义桥接场景。
Local 是 CLI/TUI/Desktop 三种表面的统一入口。所有其他通道都通过 Gateway Runner 调用同一 AIAgent 核心,只有 Local 直接面向终端用户。
架构要点:
BasePlatformAdapter,实现 connect()、send_message()、handle_message() 等核心方法GatewayRunner 路由至 AIAgent,session 按 chat_id 隔离deliver="telegram")plugin.yaml + PEP 562 __getattr__ 实现零开销懒加载[SILENT] / NO_REPLY)允许 agent 在无需回复时静默fresh_final_after_seconds 最终消息重发Hermes 通道体系正处于从核心硬编码向插件架构迁移的过程中。Discord、Slack、Matrix、Mattermost、Feishu、DingTalk 等已从 gateway/platforms/ 迁移至 plugins/platforms/。但 Platform 枚举中仍保留这些值以确保向后兼容。新的 LINE、IRC、SimpleX 通道直接以插件形式发布,无需修改核心代码(参见 Issue #40181 关于 LINE 在 Platform 枚举中缺失导致 channel_prompts 静默失效的已知问题)。
31 个通道中有 9 个(29%)针对中国市场:Feishu、DingTalk、WeCom、WeCom Callback、Weixin、QQ、Yuanbao、BlueBubbles、Photon(后两者虽非中国平台,但 iMessage 在中国用户中占比较高)。腾讯系独占 5 个(WeCom ×2 + Weixin + QQ + Yuanbao),反映 Hermes 在中国开发者社区的定位。
Baileys bridge(低门槛、有风险)和 Cloud API(高门槛、生产级)的双轨制为不同阶段用户提供平滑升级路径。两套适配器共享 WhatsAppBehaviorMixin(whatsapp_common.py)实现代码复用。
is_safe_url 检查 + 异步 redirect hook 双重验证所有媒体 URLTelegram、Discord、Slack、Matrix、Feishu、WhatsApp、Signal、Weixin、Yuanbao 支持流式输出(progressive edits)。WeCom 和 Email 不支持——每次响应作为单个完整消息发送。LINE、IRC、SMS、ntfy 也不支持流式。
报告生成时间:2026-06-29 · 调查方法:官方文档交叉验证 + GitHub 源码检视 + 社区 issue/PR 追踪
免责声明:本报告中所有数据均来自公开可查的官方文档和 GitHub 仓库。通道功能和支持状态可能随版本更新而变化。