163 lines
5.5 KiB
Markdown
163 lines
5.5 KiB
Markdown
---
|
||
title: "Hermes Agent 安装教程:看完就能去闲鱼接单"
|
||
source: "https://x.com/eternityspring/status/2041735065865220416"
|
||
author:
|
||
- "[[@eternityspring]]"
|
||
published: 2026-04-08
|
||
created: 2026-04-09
|
||
description: "Hermes Agent 必定是新一代的 OpenClaw,想想前一段时间多少人在闲鱼吃到 OpenClaw 的红利,接下来你也可以吃到 Hermes 的红利。Hermes 是 Nous Research 出的开源 AI Agent 框架,支持自建学习循环(会从使用中积累技能)、..."
|
||
tags:
|
||
- "clippings"
|
||
---
|
||
Hermes Agent 必定是新一代的 OpenClaw,想想前一段时间多少人在闲鱼吃到 OpenClaw 的红利,接下来你也可以吃到 Hermes 的红利。
|
||
|
||
Hermes 是 Nous Research 出的开源 AI Agent 框架,支持自建学习循环(会从使用中积累技能)、接入 15+ 模型提供商、跨平台消息集成(Telegram / Discord / Slack / WhatsApp)。
|
||
|
||
## 自动挡安装
|
||
|
||
在 Mac 或者 Linux 环境,在终端输入如下命令后回车:
|
||
|
||
```text
|
||
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
|
||
```
|
||
|
||
Windows 环境,在 PowerShell 中输入:
|
||
|
||
```text
|
||
irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1 | iex
|
||
```
|
||
|
||
脚本会自动检测并安装 Python、Node.js、Git、ripgrep 等所有依赖,耐心等待即可:
|
||
|
||

|
||
|
||
安装脚本运行中
|
||
|
||
## 配置向导
|
||
|
||
安装完成后会自动进入配置向导,选第一项 **Quick setup**(推荐):
|
||
|
||

|
||
|
||
选择 Quick setup
|
||
|
||
进入 Inference Provider 配置,提示输入 OpenRouter API Key,粘贴提前申请好的 Key 后回车(没有的话先看文末番外):
|
||
|
||

|
||
|
||
填写 OpenRouter API Key
|
||
|
||
接着选择默认模型。列表里有很多免费模型,这里选 nvidia/nemotron-3-super-120b-a12b:free,完全免费,效果不错:
|
||
|
||

|
||
|
||
选择默认模型
|
||
|
||
接下来是配置消息平台,选 **Set up messaging now**:
|
||
|
||

|
||
|
||
配置消息平台
|
||
|
||
选 Telegram,粘贴 Bot Token(申请方式见下一节),回车确认:
|
||
|
||

|
||
|
||
填写 Telegram Token
|
||
|
||
接着设置 Allowed user IDs(填你自己的 Telegram 数字 ID,不填则任何人都能用你的 Bot),Home Channel ID 可以留空后续再配。最后问是否安装为系统服务(launchd),选 **Y** 可以开机自启、后台常驻:
|
||
|
||

|
||
|
||
完成 Telegram 配置
|
||
|
||
> 怎么查自己的 Telegram 数字 ID:在 Telegram 里给 [@userinfobot](https://x.com/@userinfobot) 发任意消息,它会回复你的 ID。
|
||
|
||
## 申请 Telegram Bot
|
||
|
||
1. 在 Telegram 搜索 [@BotFather](https://x.com/@BotFather)
|
||
2. 发送 /newbot,按提示取名(用户名必须以 bot 结尾)
|
||
3. 拿到 Bot Token,格式类似 123456789:AAxxxxxxxx
|
||
|
||
## 启动成功
|
||
|
||
配置完成后运行 hermes 启动,欢迎页,说明一切正常:
|
||
|
||

|
||
|
||
Hermes 启动成功
|
||
|
||
打开 Telegram,找你的 Bot 发消息测试:
|
||
|
||

|
||
|
||
Telegram 测试成功
|
||
|
||
## 手动挡安装
|
||
|
||
克隆项目:
|
||
|
||
```text
|
||
git clone https://github.com/nousresearch/hermes-agent.git
|
||
cd hermes-agent
|
||
```
|
||
|
||
安装依赖:
|
||
|
||
```text
|
||
pip install -r requirements.txt
|
||
```
|
||
|
||
运行:
|
||
|
||
```text
|
||
python -m hermes
|
||
```
|
||
|
||
手动挡和自动挡用法完全一样,适合想改源码或固定版本的场景。
|
||
|
||
## 基本使用
|
||
|
||
- hermes — 启动交互式对话
|
||
- hermes model — 选择模型提供商和模型
|
||
- hermes tools — 配置启用哪些工具
|
||
- hermes config set — 设置单个配置项
|
||
- hermes gateway — 启动消息网关(Telegram、Discord 等)
|
||
- hermes setup — 重新运行完整配置向导
|
||
- hermes claw migrate — 从 OpenClaw 迁移配置
|
||
- hermes update — 更新到最新版本
|
||
- hermes doctor — 诊断问题
|
||
|
||
## 常见问题 & 排错
|
||
|
||
**Q: 提示 API call failed after 3 retries: HTTP 400: No models provided**
|
||
|
||
配置文件编码问题(Windows 常见)。让 Claude 帮你修,告诉它报错信息,它会自动定位 [cli.py](https://cli.py/) 里的 open() 调用并加上 encoding="utf-8" 参数。
|
||
|
||

|
||
|
||
Windows 编码报错修复
|
||
|
||
**Q: Telegram Bot 没有响应**
|
||
|
||
没有设置 UserId,手动设置或者让 Claude 设置下就行。
|
||
|
||
## 番外:申请 OpenRouter API Key
|
||
|
||
Hermes 支持多种模型提供商,推荐先配 OpenRouter——有大量免费模型可用,白嫖入门最方便。
|
||
|
||
打开 [openrouter.ai/keys](https://openrouter.ai/keys),点击 Create Key,名字填 hermes,直接点 Create:
|
||
|
||

|
||
|
||
创建 OpenRouter API Key
|
||
|
||
Key 只显示一次,**立刻复制保存好**:
|
||
|
||

|
||
|
||
复制 API Key
|
||
|
||
Hermes 还有很多玩法没展开:定时任务、自建skills……后续会继续写。
|
||
|
||
**觉得有用就关注一下**,不定期分享 AI 工具的实际用法,不讲概念,只讲能上手的。 |