From e3d875a3e6359a76e632243bcb68e3dcbd05b024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E7=B3=AF=20=28Xiaonuo=29?= Date: Thu, 23 Apr 2026 17:50:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor(onboard):=20=E9=87=8D=E5=86=99=2009-he?= =?UTF-8?q?rmes-config=EF=BC=8C=E8=81=9A=E7=84=A6=20hermes-har=20=E5=92=8C?= =?UTF-8?q?=20auxiliary=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 安装 hermes-har(@shazhou/hermes-harness) - auxiliary models 配置指南(vision/compression/session_search 等) - 性格配置说明(需跟主人确认后设置) - 更新 SKILL.md 说明 [小糯] --- hermes/shazhou-family-onboard/SKILL.md | 2 +- .../references/09-hermes-config.md | 88 +++++++++++++++---- 2 files changed, 73 insertions(+), 17 deletions(-) diff --git a/hermes/shazhou-family-onboard/SKILL.md b/hermes/shazhou-family-onboard/SKILL.md index af4abac..b9a9055 100644 --- a/hermes/shazhou-family-onboard/SKILL.md +++ b/hermes/shazhou-family-onboard/SKILL.md @@ -40,7 +40,7 @@ skill_view("shazhou-family-onboard", "references/01-nvm-node.md") | 06 | Gitea 账号 & tea CLI | `references/06-gitea-tea.md` | tea 登录、注册 SSH 公钥 | | 07 | Tailscale 组网 | `references/07-tailscale.md` | 加入 tailnet,验证互通 | | 08 | 家族成员互相认识 | `references/08-family-members.md` | 了解各设备和伙伴的联系方式 | -| 09 | Hermes 基础配置 | `references/09-hermes-config.md` | config.yaml 必要字段检查 | +| 09 | Hermes 基础配置 | `references/09-hermes-config.md` | hermes-har、auxiliary models、性格配置 | | 10 | Skills 同步 | `references/10-skills-sync.md` | 克隆 skills repo,运行 sync.sh | ## 自检模式 diff --git a/hermes/shazhou-family-onboard/references/09-hermes-config.md b/hermes/shazhou-family-onboard/references/09-hermes-config.md index acbe60a..45f0d7b 100644 --- a/hermes/shazhou-family-onboard/references/09-hermes-config.md +++ b/hermes/shazhou-family-onboard/references/09-hermes-config.md @@ -2,29 +2,37 @@ ## 检查 -确认 Hermes 配置文件存在: +```bash +# config.yaml 存在 +ls ~/.hermes/config.yaml - ls ~/.hermes/config.yaml +# hermes-har 可用 +hermes-har models status +``` -查看内容确认关键字段: +✅ 达标:config.yaml 存在,`hermes-har models status` 能显示当前模型配置 - cat ~/.hermes/config.yaml +## 前置 -✅ 达标:config.yaml 存在,且包含以下必要配置 +- 已完成 01 (Node.js & nvm) — hermes-har 是 npm 全局包 +- 已完成 03 (cfg CLI) — 需要 provider 相关配置 -## 必要配置项 +## 安装 + +### 1. 安装 hermes-har + +```bash +npm install -g @shazhou/hermes-harness +``` + +### 2. 确认 config.yaml 基本结构 config.yaml 应包含: -1. **provider / model** — LLM 提供商和模型 -2. **telegram** — bot token 和 home channel(如果用 Telegram) -3. **memory** — 应有 user profile 和 agent notes - -### 示例结构 - ```yaml provider: custom model: claude-opus-4.6 + custom: api_key: "..." base_url: "http://..." @@ -34,12 +42,60 @@ telegram: home_channel: "..." ``` -## 安装 - 如果 config.yaml 不存在或缺少字段,联系主人获取配置信息。 -Hermes 本身的安装参考官方文档:https://github.com/nousresearch/hermes-agent +### 3. 配置 Auxiliary Models + +Auxiliary models 用于非主对话任务(vision、压缩、搜索等),可以用更便宜/快速的模型: + +```bash +# 查看当前状态 +hermes-har models status + +# 查看可用 providers +hermes-har models providers + +# 设置 auxiliary model(每个任务单独设置) +hermes-har models switch [model] --aux vision +hermes-har models switch [model] --aux compression +hermes-har models switch [model] --aux session_search +hermes-har models switch [model] --aux web_extract +hermes-har models switch [model] --aux skills_hub +hermes-har models switch [model] --aux approval +hermes-har models switch [model] --aux mcp +hermes-har models switch [model] --aux flush_memories +``` + +推荐配置: +- **vision**: 用支持视觉的模型(如 gemini-3.1-pro-preview) +- **其他 auxiliary**: 用快速便宜的模型(如 gpt-5.4-mini) + +### 4. 性格配置(可选) + +询问主人是否需要设置可切换的性格类型。如果需要: + +```bash +# 查看已有性格 +hermes-har personality list + +# 添加性格 +hermes-har personality add "" + +# 切换性格 +hermes-har personality switch + +# 通过 Telegram 切换 +hermes-har personality switch --tg +``` + +⚠️ 性格配置因人而异,必须跟主人确认后再设置。 ## 验证 - hermes --version +```bash +hermes-har models status +# 应显示 main model 和所有 auxiliary models + +hermes --version +# 应能正常输出版本号 +```