Files
AgentsMeeting/gateway/linux
zhiwei 9c73e8b107 docs: architecture design doc + gitignore update
架构文档记录方案一(GDB Hook)的技术路线和关键信息源。
.gitignore 新增 *.AppImage / *.exe / *.dll 规则
2026-06-23 21:24:20 +08:00
..
2026-06-23 20:40:19 +08:00

MoWeChat — 莫荷微信 Bot (Linux iLink 版)

将莫荷的微信 bot 从 Windows wxhelper DLL 注入方案迁移到 Linux 原生运行的腾讯官方 iLink Bot API。

架构

微信 → iLink Bot API (ilinkai.weixin.qq.com) → wechat_agent.py → Hermes Gateway (:8642) → Agent
  • iLink Bot API: 腾讯 2026 年开放的官方微信个人号 Bot 接口
  • weixin-bot-sdk: Python SDK,处理 QR 登录、长轮询收消息、发消息
  • Hermes Gateway: 原有的 LLM 处理管道,无变动

快速开始

cd gateway/linux
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
python3 wechat_agent.py

首次运行会显示二维码,用莫荷的手机微信扫码登录。凭证保存在 ~/.weixin-bot/credentials.json,后续运行自动跳过扫码。

与 Windows 版的差异

功能 Windows (wxhelper) Linux (iLink)
消息收发 DLL 注入 → HTTP 官方 API → HTTP
QR 登录 降版本微信手动登录 终端二维码扫码
图片 OCR doubao API doubao API
文章处理 article_processor article_processor
图片生成 SenseNova SenseNova
联系人查询 wxhelper API iLink 不支持
历史记录查询 wxhelper SQL 改用 session_search
文件发送 wxhelper sendFile 发送下载链接
5801 端口 支持 支持

服务管理

systemd service:

sudo cp mohe-wechat.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable mohe-wechat
sudo systemctl start mohe-wechat

日志

日志文件:../../logs/wechat_agent_linux.log