Hermes Agent 本地部署实战:接入 DeepSeek + 飞书机器人 + Gateway
最近体验了一下 Hermes Agent,本地部署比预想简单,核心能力是把 LLM、工具调用、消息平台和 Agent Runtime 串起来。本文记录一套可直接跑通的部署方案:DeepSeek + Hermes + 飞书 Gateway。
最终效果:
飞书
↓
Hermes Gateway
↓
Hermes Agent
↓
DeepSeek
↓
Tools(文件 / 浏览器 / 代码)
一、安装 Hermes
安装:
pip install hermes-agent
验证:
hermes
启动后出现:
Hermes Agent v0.x
说明安装成功。
二、配置模型(切换 DeepSeek)
执行初始化:
hermes setup
选择:
Provider: DeepSeek
Model: deepseek-v4-flash
填写:
API Key
完成后生成:
~/.hermes/config.yaml
~/.hermes/.env
关键配置:
model:
default: deepseek-v4-flash
provider: deepseek
base_url: https://api.deepseek.com
验证:
hermes
输入:
hello
能正常回复说明模型配置成功。
三、启动 Gateway 接入飞书
启动:
hermes gateway
选择:
Scan QR code to create a new bot
手机飞书扫码完成授权。
推荐权限:
私聊:
Use DM pairing approval
群聊:
Respond only when @mentioned
配置完成后会看到:
Connecting to Feishu / Lark... done
说明机器人已经接入成功。
四、解决权限问题(最容易踩坑)
如果出现:
Unauthorized user
No user allowlists configured
说明默认拒绝所有用户。
编辑:
nano ~/.hermes/.env
开发阶段建议:
FEISHU_ALLOW_ALL_USERS=true
或者指定白名单:
FEISHU_ALLOW_ALL_USERS=false
FEISHU_ALLOWED_USERS=ou_xxx
重启:
hermes gateway
五、开启定时任务通知
飞书里打开机器人聊天窗口:
发送:
/ sethome
注意不要有空格:
/sethome
成功后:
✓ Home channel set
之后:
- cron 任务
- Agent 通知
- 后台执行结果
都会推送到当前聊天。
六、后台运行(推荐)
启动时选择:
Install launchd service
输入:
Y
之后 Hermes 会:
- 后台运行
- 开机自动启动
- 飞书持续在线
管理:
launchctl list | grep hermes
七、验证
私聊:
hello
群聊:
@Hermes 帮我写一个 FastAPI Demo
正常返回说明链路打通。
截图展示
总结
Hermes 的核心不是单纯聊天,而是把:
LLM
+
Gateway
+
Tool
+
Memory
+
消息平台
统一成一个 Agent Runtime。
本地部署跑通后,可以继续扩展:
- MCP Server
- RAG
- 多模型路由
- 定时任务
- 多 Agent 协作
整个链路跑通后,已经具备一个完整 AI Agent 系统的基础能力。