速查区
创建与初始化
hermes profile create coder # 创建一个全新的 profile hermes profile create coder --description "写代码和调试项目" # 创建时添加用途说明 coder setup # 配置这个 profile 的模型、API Key 等 coder # 进入这个 profile 的聊天(也可用 coder chat)使用指定 profile
hermes -p coder chat # 临时使用 coder profile hermes --profile coder doctor # 检查 coder profile 状态 hermes profile use coder # 把 coder 设为默认 profile hermes profile use default # 切回默认 profile查看与管理
hermes profile list # 列出所有 profile hermes profile show coder # 查看某个 profile 详情 hermes profile describe coder # 查看或设置 profile 描述 hermes profile rename coder dev-bot # 重命名 profile hermes profile delete coder # 删除 profile复制、备份与迁移
hermes profile create work --clone # 复制当前 profile 的配置、环境、SOUL、skills hermes profile create work --clone-from coder # 从指定 profile 复制 hermes profile create backup --clone-all # 尽量完整复制配置、记忆、skills、cron、plugins hermes profile export coder # 导出为 coder.tar.gz hermes profile import coder.tar.gz # 从压缩包导入Gateway / Bot
coder gateway install # 安装 coder profile 的 gateway 服务 coder gateway start # 启动 coder profile 的 gateway coder gateway stop # 停止 gateway coder gateway status # 查看 gateway 状态一句话理解:profile ≈ 一个独立身份、独立记忆、独立配置的 Hermes Agent;你可以创建多个 Agent 协同分工:一个找资料、一个写代码、一个整理知识库、一个发布内容。
详细内容
1. Profile 是什么?
你有没有想过,把 Hermes Agent 拆成多个“分身”来用?
比如:
- 一个 Agent 专门找资料
- 一个 Agent 专门写代码
- 一个 Agent 专门整理知识库
- 一个 Agent 专门发布文章
- 一个 Agent 专门接 Telegram / Discord 做机器人
这些 Agent 互相不抢记忆、不混配置,各自负责一类事情。Hermes Agent 里的profile,就是实现这种多 Agent 分工的核心功能。
在 Hermes Agent 里,profile 可以理解成“一套独立的 Agent 身份和状态”。
创建一个 profile,基本上就相当于创建了一个新的 Hermes Agent 实例。它会拥有自己独立的配置、记忆、技能、会话和运行状态。
比如你创建一个叫coder的 profile:
hermes profile create coder之后你就可以这样使用它:
coder coder setup coder gateway start这时候的coder就像一个专门用于写代码的 Hermes Agent。
2. Profile 会隔离哪些内容?
每个 profile 都有自己的 Hermes home 目录。
它通常会包含:
config.yaml:模型、工具、终端等配置.env:API Key 和环境变量SOUL.md:Agent 的人格设定 / 系统提示词memories:长期记忆sessions:历史会话skills:技能cron:定时任务plugins:插件state.db:状态数据库- gateway / bot 的运行状态
默认 profile 通常位于:
~/.hermes/其他 profile 通常位于:
~/.hermes/profiles/<profile-name>/例如:
~/.hermes/profiles/coder/ ~/.hermes/profiles/research/ ~/.hermes/profiles/book/3. 为什么要用 Profile?
Profile 最适合用来把不同用途的 Agent 分开。
例如:
| Profile | 用途 |
|---|---|
coder | 写代码、调试项目、跑测试 |
research | 搜索资料、整理信息、做研究 |
book | 写文章、整理 Obsidian、发布内容 |
bot | 接 Telegram / Discord / Slack 等消息平台 |
sandbox | 测试新配置、新插件、新模型 |
这样做的好处是:
- 不同 Agent 的记忆不会混在一起
- 不同 Agent 可以使用不同模型和 API Key
- 不同 Agent 可以有不同 skills
- 不同 Agent 可以有不同的 SOUL.md 人格设定
- 不同 Agent 可以分别接不同的 gateway / bot
比如写代码的 Agent 不需要记住你发文章的习惯;写文章的 Agent 也不需要记住某个代码项目的测试命令。
4. 创建一个新 Profile
创建全新 profile:
hermes profile create coder创建后,Hermes 会自动生成一个同名命令别名。
也就是说:
coder通常也可以写成:
coder chat本质上等价于:
hermes -p coder chat创建完成后,一般先执行:
coder setup用来配置模型、API Key、工具等内容。
5. 使用某个 Profile
临时指定 profile:
hermes -p coder chat或者:
hermes --profile coder chat如果你经常使用某个 profile,可以把它设为默认:
hermes profile use coder之后直接运行:
hermes chat就会默认进入coderprofile。
切回默认 profile:
hermes profile use default6. 查看和管理 Profile
查看所有 profile:
hermes profile list查看某个 profile 的详情:
hermes profile show coder这个命令通常会显示:
- profile 名称
- profile 路径
- 当前模型
- gateway 状态
- skills 数量
.env是否存在SOUL.md是否存在- alias 路径
重命名 profile:
hermes profile rename coder dev-bot删除 profile:
hermes profile delete coder注意:删除 profile 会删除该 profile 的配置、记忆、会话、skills 等数据。删除前要确认是否需要备份。
7. Clone:快速复制一个 Agent
如果你想基于当前 profile 快速复制一个新 Agent,可以使用--clone。
hermes profile create work --clone它会复制当前 profile 的:
config.yaml.envSOUL.mdskills
但会给新 profile 保持新的会话和记忆。
如果要从指定 profile 复制:
hermes profile create work --clone-from coder如果要尽量完整复制配置、记忆、skills、cron、plugins 等,可以使用:
hermes profile create backup --clone-all不过要注意:--clone-all一般不会复制大型历史状态,例如 session history、state.db、backups、checkpoints 等。
如果想完整备份或迁移,更适合使用:
hermes profile export coder hermes profile import coder.tar.gz8. Profile 和 Gateway 的关系
每个 profile 都可以有自己的 gateway。
比如:
coder gateway install coder gateway start这样coder这个 Agent 就可以作为一个独立 bot 运行。
如果你有多个用途,可以让多个 profile 同时在线:
coder gateway start research gateway start book gateway start常见场景:
- 一个 profile 接 Telegram
- 一个 profile 接 Discord
- 一个 profile 做定时任务
- 一个 profile 专门处理代码项目
- 一个 profile 专门整理文章和知识库
9. Profile 不是 Sandbox
这一点很重要。
Profile 隔离的是 Hermes 的状态,不是操作系统权限。
也就是说:
- profile 会隔离记忆、配置、skills、会话
- profile 不等于 Docker
- profile 不等于虚拟机
- profile 不等于文件系统沙箱
- 默认情况下,它仍然以同一个系统用户身份运行
所以,如果你的系统用户能访问某个目录,那么不同 profile 里的 Agent 通常也能访问这个目录。
如果你需要真正的安全隔离,应该配合:
- Docker
- 单独的 Linux 用户
- 文件权限控制
- sandbox 配置
- 独立服务器或虚拟机
更准确地说:
profile = 独立身份 + 独立记忆 + 独立配置 sandbox = 权限隔离 + 文件系统/进程隔离两者不是一回事。
10. Profile 和浏览器连接的关系
如果你在 Hermes 里使用:
/browser connect这是把当前 Hermes 会话的浏览器工具连接到一个本地可见的 Chromium 调试浏览器。
它和 profile 是两个概念:
- profile 决定 Agent 的身份、记忆、配置、skills
/browser connect决定当前会话控制哪个浏览器
也就是说,不同 profile 可以是不同 Agent,但它们是否使用同一个浏览器环境,取决于你怎么连接浏览器。
例如:
hermes -p coder chat hermes -p book chat这两个 profile 的 Agent 状态是独立的。
但如果它们都连接到同一个本地浏览器调试 profile,那么浏览器登录状态可能是共享的。
11. 一个简单例子
假设你想让 Hermes 分成三个用途:
- 写代码
- 查资料
- 写文章
可以这样创建:
hermes profile create coder --description "写代码、调试项目、运行测试" hermes profile create research --description "搜索资料、整理信息、生成研究摘要" hermes profile create writer --description "整理知识库、撰写文章、发布内容"然后分别初始化:
coder setup research setup writer setup使用时:
coder chat research chat writer chat这样你就拥有了三个互不干扰的 Hermes Agent。
12. 总结
Hermes Agent 的 profile 是一个非常适合“多 Agent 工作流”的设计。
你可以把它理解成:
一个 profile = 一个独立的 Hermes Agent 身份它适合用来隔离:
- 不同用途
- 不同记忆
- 不同模型
- 不同 API Key
- 不同 skills
- 不同 bot / gateway
但也要记住:
profile 不是安全沙箱如果只是想把“写代码的 Agent”和“写文章的 Agent”分开,用 profile 就很合适。
如果想限制文件访问权限,则需要额外的系统级隔离方案。