news 2026/9/12 17:39:10

Hermes进阶操作

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
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 list
hermes profile current看当前正在使用哪个 profilehermes profile current
hermes profile use <名字>切换 profilehermes profile use brand_test
hermes profile show展示当前 profile 元信息hermes profile show
hermes profile rename 旧名 新名重命名 profilehermes profile rename old new
hermes profile export file.yaml导出当前 profile 配置hermes profile export brand_test.yaml
hermes profile import file.yaml导入配置到当前 profilehermes profile import brand_test.yaml
hermes profile alias设置别名(很少用)

三、常用操作

  1. 切换环境 + 重启网关生效配置

    hermes profile use brand_test hermes gateway stop hermes gateway start
  2. 清理当前 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
  3. 复制一套已有 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
  4. 需要注意:use默认切换有些场景会影响其他网关配置,造成混乱,如出现这种类似情况,可以尝试使用-p单独启动网关

    # 直接进入brand_test对话,不切换全局默认hermes-pbrand_test chat# 直接重启该profile网关(不用先use)hermes-pbrand_test gateway restart# 查看该profile信息hermes-pbrand_test profile show# 查看该profile的MCP列表hermes-pbrand_test skills list# 执行健康检查hermes-pbrand_test doctor
  5. 重要坑

    • ‑p gateway start启动网关,只会对本次进程生效;如果你后台已有旧 gateway 进程,需要先 stop 旧进程。
    • -p不会修改.env文件;密钥依旧全局共用。
    • 建议临时测试:优先用‑p,不污染 shell 默认 profile。
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/9/12 17:38:44

LeetCode hot100——128.最长连续序列

题目给定一个未排序的整数数组 nums &#xff0c;找出数字连续的最长序列&#xff08;不要求序列元素在原数组中连续&#xff09;的长度。请你设计并实现时间复杂度为 O(n) 的算法解决此问题。示例 1&#xff1a;输入&#xff1a;nums [100,4,200,1,3,2] 输出&#xff1a;4 解…

作者头像 李华
网站建设 2026/9/12 17:38:04

贾子理论的正义内核:去伪存真、唤醒认知与重构真理体系

标题贾子理论的正义内核&#xff1a;去伪存真、唤醒认知与重构真理体系摘要本文系统阐释贾子理论的正义内核&#xff0c;其核心命题可概括为&#xff1a;不以谁说了算为真&#xff0c;而以事实、逻辑与客观规律为真&#xff1b;不让谬误继续统治认知&#xff0c;不让权威垄断真…

作者头像 李华
网站建设 2026/9/12 17:33:38

FPGA/DSP供电LDO国产化实战:低噪声高瞬态响应设计

1. 项目概述&#xff1a;为什么一块LDO芯片能成为FPGA/DSP供电的“国产化破局点” 我做电源设计十年&#xff0c;经手过上百个FPGA和DSP项目&#xff0c;从Xilinx Kintex-7到Intel Agilex&#xff0c;从TI C66x到全志Hifi4 DSP&#xff0c;最常被客户紧急叫停的&#xff0c;不是…

作者头像 李华
网站建设 2026/9/12 17:33:23

基于扩展卡尔曼滤波的电池SOC估计技术详解

1. 项目背景与核心需求在电池管理系统中&#xff0c;荷电状态&#xff08;SOC&#xff09;估计是最关键的技术挑战之一。SOC作为反映电池剩余电量的核心参数&#xff0c;其估计精度直接影响电池系统的安全运行和使用寿命。传统库仑计数法虽然实现简单&#xff0c;但存在初始误差…

作者头像 李华
网站建设 2026/9/12 17:28:06

Java课程设计:Swing广告墙系统登录、权限与查询实现解析

简介&#xff1a;这是一份基于 Java 图形界面开发的“广告墙”课程实验设计项目&#xff0c;面向计算机相关专业在校学生、教师及企业开发者&#xff0c;尤其适合需要完成课设、毕设或项目初期演示的读者。项目实现了管理员登录注册、广告信息增删改查、用户个人广告查询等功能…

作者头像 李华