Skip to content

About

Hermes Agent配置工作流:config设置/API key/fallback链

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hermes 配置工作流

Hermes 配置工作流

别直接改 config.yaml——Hermes 会拦截;用 hermes config set,密钥只进 .env。

Status Critical Pitfalls Refs License

它解决什么问题 - 为什么比手动强 - 工作流 - 实测参数 - 快速开始


它解决什么问题

我要改 Hermes 的配置:换搜索后端、接 API key、调模型、配 fallback 链。但 ~/.hermes/config.yaml 被安全保护直接拦截(patch / write_file / sed 都被拒),.env 写入也有独立的审批陷阱。更隐蔽的是:fallback 链写成字符串列表看似成功、运行时却是空的;cron job 没固定模型,全局配置一变就被"防意外花钱"机制跳过执行。这些坑都不报错,只会静默不生效。

为什么比手动强

凭感觉改配置 本仓库
patch/write_file 改 config.yaml 一律用 hermes config set <key> <value>(自动校验)
把 API key 写进 config.yaml 密钥只进 ~/.hermes/.env,config 只管设置
fallback 写成 '["a","b"]' 字符串 必须是 dict 列表 {provider, model, base_url}
改完以为生效了 hermes fallback list 权威验证显示 N 条
换 key 直接改 .env 用 hermes auth add 凭据池,自动轮换
cron 偶尔 402/502 就跳过 hermes cron edit --model --provider 固定模型

工作流

读配置(cat ~/.hermes/config.yaml / grep 定位段落)
   ↓
改值(hermes config set <key> <value>;密钥 → .env 脚本写入)
   ↓
配 fallback(dict 列表,不是字符串)+ 凭据池(hermes auth add)
   ↓
验证(hermes fallback list / hermes auth list 看 ← 标记)
   ↓
重启生效(docker restart hermes 或新会话读新配置)

实测参数

  • config 直改被拦:patch / write_file / sed 改 config.yaml 均被安全保护拒绝(2026-08-11 实测)
  • fallback 字符串静默失效:hermes config set fallback_providers '["a","b"]' 解析正常但运行时链为空,必须写 dict 列表
  • 504 排障:grep 504 errors.log → curl 测网关健康 → 确认 fallback 链是否真生效(空 = 从未生效)
  • 凭据池:hermes auth list <provider> 的 ← 标记才是当前生效 key,不是 grep .env(2026-08-14 教训)
  • 配套参考:12 篇 references/(绕过法、key 切换铁律、插件全代码等),以实际运行为准

快速开始

# 改配置(不要直接编辑文件)
hermes config set web.backend tavily
hermes config set model.default "MiniMax-M2.7-highspeed"

# 接密钥:写进 .env(用脚本绕过 .env 审批,不要内联)
grep TAVILY ~/.hermes/.env

# 配 fallback + 凭据池
hermes auth add tokenrhythm --type api-key --label tr-key2 --api-key "$(cat key.txt)"
hermes fallback list    # 权威验证:必须显示 N 条

# 固定 cron 模型(防 402/502 跳过执行)
hermes cron edit <JOB_ID> --model deepseek-v4-flash-0731 --provider tokenrhythm

适用边界

  • 需要字符串值(如 tool_progress: off)时,config set 会转成布尔,须用脚本直编 config.yaml
  • 子代理环境中 CLI 可能不在 PATH、config 属主为 root,按 references/ 的逃生路径处理
  • 密钥命令一律从文件读取,禁止内联(飞书会打码)

License

MIT

About

Hermes Agent配置工作流:config设置/API key/fallback链

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors