尧图网站设计 尧图网站设计YAOTU DESIGN
ARTICLE DETAIL

资讯详情

深耕网站设计与一线实操的经验洞察。

Hermes进阶操作

Hermes进阶操作 一、Profile 基础概念profile独立隔离的Agen实例每个拥有完全独立的全套资源互不干扰独立目录~/.hermes/profiles/名称/专属文件config.yaml模型 / 工具、.env密钥、SOUL.md人设独立数据记忆库 state.db、会话 sessions、技能 skills、定时 cron、网关服务创建后自动生成专属命令别名二、核心命令1.创建Profile# 空白新建hermes profile create coder# 从当前profile复制配置不复制.env密钥安全hermes profile create writer--clone# 从指定profile复制配置hermes profile create tester --clone-from coder# 完整克隆配置密钥记忆会话全复制慎用密钥会同步hermes profile create backup --clone-all参数说明--clone复制 config、SOUL.md不复制 .env推荐日常克隆--clone-from指定profile复制配置--clone-all完整复制全部数据含 API 密钥、历史对话记忆2.删除Pofile# 删除hermes profile delete参数说明delete删除整个 profile缓存 记忆3.其他常用命令# 查看命令hermes profile-h命令作用示例hermes profile list列出全部 profilehermes profile listhermes profile current看当前正在使用哪个 profilehermes profile currenthermes profile use 名字切换 profilehermes profile use brand_testhermes profile show展示当前 profile 元信息hermes profile showhermes profile rename 旧名 新名重命名 profilehermes profile rename old newhermes profile export file.yaml导出当前 profile 配置hermes profile export brand_test.yamlhermes profile import file.yaml导入配置到当前 profilehermes profile import brand_test.yamlhermes profile alias设置别名很少用—三、常用操作切换环境 重启网关生效配置hermes profile use brand_test hermes gateway stop hermes gateway start清理当前 profile 上下文 / 缓存v0.9.0 无 reset手动删文件hermes profile use brand_test# 删除会话缓存rm-rf/root/.hermes/cache/profiles/brand_test# 可选删除该profile持久记忆rm-rf/root/.hermes/memories/brand_test# 重启网关hermes gateway restart复制一套已有 profile迁移配置# 切源环境导出配置hermes profile use brand_test hermes profileexportbrand_test.yaml# 创建新环境导入hermes profile create brand_test_new hermes profile use brand_test_new hermes profileimportbrand_test.yaml# 重启网关hermes gateway restart需要注意use默认切换有些场景会影响其他网关配置造成混乱如出现这种类似情况可以尝试使用-p单独启动网关# 直接进入brand_test对话不切换全局默认hermes-pbrand_test chat# 直接重启该profile网关不用先usehermes-pbrand_test gateway restart# 查看该profile信息hermes-pbrand_test profile show# 查看该profile的MCP列表hermes-pbrand_test skills list# 执行健康检查hermes-pbrand_test doctor重要坑‑p gateway start启动网关只会对本次进程生效如果你后台已有旧 gateway 进程需要先 stop 旧进程。-p不会修改.env文件密钥依旧全局共用。建议临时测试优先用‑p不污染 shell 默认 profile。
返回列表