Hermes Agent 接 Matrix,最稳的方式是先给 bot 创建一个独立 Matrix 账号,再用 access token 配到 ~/.hermes/.env。它支持 DM、房间、线程、文件和可选端到端加密,但新手先把普通明文房间跑通,再折腾 E2EE。
基础步骤
- 在自己的 homeserver 或 matrix.org 创建 bot 账号。
- 在 Element 的设置里找到 access token,或通过 Matrix login API 获取。
- 运行
hermes gateway setup,选择 Matrix。 - 填写 homeserver、access token、允许用户 ID。
- 启动
hermes gateway,邀请 bot 进房间测试。
手动配置重点
MATRIX_HOMESERVER=https://matrix.example.org
MATRIX_ACCESS_TOKEN=***
MATRIX_ALLOWED_USERS=@alice:matrix.example.org群房间默认需要 @ 才回复;如果要主动消息和 cron 输出,进房间后用 /sethome 或设置 MATRIX_HOME_ROOM。
一句话:Matrix 配置先跑通 homeserver、token、allowed users,再处理加密房间。
官方开源地址:https://github.com/NousResearch/hermes-agent;官方文档入口:https://hermes-agent.nousresearch.com/。