← 返回主页
Hermes Agent · DeepSeek-V4 · 24h 在线
Telegram AI 机器人
基于 Nous Research Hermes Agent,接入 DeepSeek-V4。
89 个内置技能,浏览器自动化、代码执行、论文写作全搞定。
💬
智能对话
DeepSeek-V4 驱动,支持复杂推理和代码生成
🖼️
图片理解
发送截图/公式/图表,AI 识别并分析
🧰
89 个技能
浏览器操控、GitHub 管理、论文写作、音乐创作
🌐
网页搜索
DuckDuckGo 实时搜索,获取最新信息
💻
代码执行
直接在聊天中运行 Python/Shell 代码
★ 推荐方案:Hermes Agent
现在使用 Hermes Agent Gateway 驱动 Telegram Bot,功能远超原 Python 脚本:
| 能力 | Hermes Agent 当前 | 旧 Python Bot |
| 对话模型 | DeepSeek-V4-Pro | DeepSeek-V3 |
| 工具调用 | 浏览器/终端/文件/代码执行/搜索/生图 | 仅文字对话 |
| 记忆系统 | 跨会话持久记忆 + 用户档案 | 无 |
| 技能生态 | 89 个内置 Skill,可自定义 | 无 |
| 部署方式 | 一条命令安装 + launchd 开机自启 | 手动 pip 安装 + 脚本启动 |
| 更新维护 | hermes update 自动更新 | 手动 git pull |
1 工作原理
Telegram 消息
→
Hermes Gateway
→
DeepSeek API
→
+ 工具调用
→
AI 回复
→
Telegram 聊天
消息到达 → Hermes Agent 处理(可调用浏览器/终端/搜索等工具)→ DeepSeek-V4 生成回复 → 发回 Telegram。
Gateway 作为 macOS launchd 服务 24 小时运行,崩溃自动重启。
2 部署 Hermes Agent Bot
安装 Hermes Agent
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
自动安装 uv、Python 3.11、Node.js 及全部依赖。安装完重启终端。
配置模型和 API Key
hermes setup
交互式向导:选择 DeepSeek → 输入 API Key → 一路回车默认即可。
接入 Telegram
设置环境变量并安装 Gateway 服务:
# 写入 Telegram Bot Token(去 @BotFather 创建)
echo "TELEGRAM_BOT_TOKEN=你的Token" >> ~/.hermes/.env
echo "DEEPSEEK_API_KEY=sk-你的Key" >> ~/.hermes/.env
echo "TELEGRAM_ALLOWED_USERS=你的TelegramID" >> ~/.hermes/.env
echo "GATEWAY_ALLOW_ALL_USERS=true" >> ~/.hermes/.env
# 安装并启动 Gateway
hermes gateway install
验证运行
hermes gateway status
tail -f ~/.hermes/logs/gateway.log
看到 ✓ telegram connected 即成功。去 Telegram 发消息测试。
Gateway 安装后自动注册为 macOS launchd 开机自启服务,崩溃自动重启,无需手动维护。
3 配置中文回复
Hermes Agent 默认英文回复。编辑 ~/.hermes/SOUL.md 添加中文指令:
# ⚠️ 这会覆盖你已有的 SOUL.md,如果已有自定义内容请先备份
cp ~/.hermes/SOUL.md ~/.hermes/SOUL.md.bak 2>/dev/null; cat > ~/.hermes/SOUL.md << 'EOF'
You are Hermes Agent, an intelligent AI assistant.
CRITICAL: You MUST reply in Chinese (简体中文) at all times.
The user speaks Chinese. Never use English unless asked.
EOF
修改后重启 Gateway 生效:hermes gateway restart
⚠️ 这会覆盖你已有的 SOUL.md,如果已有自定义内容请先备份。
4 备选方案:轻量 Python Bot
如果只需要简单文字对话,不需要工具调用和技能系统,也可以用原来的 Python 脚本:
下载并安装
git clone https://github.com/LiHongwei-cn/lihongwei-cn.git
cd lihongwei-cn
pip install -r bot/requirements.txt
配置并启动
创建 .env 文件:
TELEGRAM_TOKEN=123456:ABC-DEF1234ghiJKL
DEEPSEEK_API_KEY=sk-你的deepseek密钥
macOS:cd lihongwei-cn && python bot/tgbot.py | Windows:cd lihongwei-cn && python bot\tgbot.py
旧 Python Bot 功能:文字对话 + 图片理解。不具备 Hermes Agent 的工具调用、记忆系统、技能生态等高级功能。
本页被阅读 ... 次