Hermes Agent Profile:把一个 AI 助手拆成六个可管理的工作身份
一篇更新后的 Hermes Agent profile 指南:补入 X 上关于多 profile 协调、Kanban、xurl/browser skills 和 Agent OS 讨论的公开线索。
Hermes Agent Profile:把一个 AI 助手拆成六个可管理的工作身份
最容易误会的一点,是把 profile 当成“换个昵称”。不是。Hermes Agent 里的 profile 更像一套独立的工作台:自己的配置、环境变量、技能、记忆、会话、定时任务、日志和网关状态。你在飞书里看到的还是一个聊天机器人,但后台跑的是哪一个 profile,决定了它带着哪套工具、哪段记忆、哪个模型、哪些凭据在工作。
这事儿对日常使用很关键。一个写文章的助手,不应该顺手拿到线上运维的习惯和 cron;一个代码审查助手,也不该混进个人生活记忆。Profile 解决的不是“让 AI 更聪明”,而是把 AI 的运行边界拆清楚。
Profile 到底隔离了什么
按 Hermes Agent 官方文档,默认 profile 在 ~/.hermes,命名 profile 在 ~/.hermes/profiles/<name>。每个 profile 都有自己的一套文件和状态,包括:
config.yaml:模型、provider、工具、terminal、memory、delegation 等配置。.env:API key、Feishu app、Telegram bot 等凭据。注意不要把这个文件提交或发给别人。skills/:这个 profile 可用的技能库。memories/:这个 profile 的用户记忆与工作记忆。sessions/:聊天记录和历史会话。cron/:定时任务。gateway.pid和gateway_state.json:这个 profile 对应的网关进程状态。
但它不是沙箱。Profile 隔离的是 Hermes 自己的状态,不是 macOS 或 Linux 的系统权限。只要 terminal 后端还是本机用户权限,profile 里的 agent 仍然能访问那个用户能访问的文件。要限制文件系统边界,需要另外配工作目录、权限、容器或远程执行环境。
为什么要建多个 profile
一个人只用默认 profile,也能聊天、写代码、查资料。但当 AI 进入真实工作流,默认 profile 很快会变成杂物间:写作偏好、代码仓库、飞书群、报表 token、GitHub 权限、定时任务,全堆在一起。出了问题,很难判断是配置错、记忆污染、工具没启用,还是跑错机器人。
多 profile 的价值在这里:
- 身份分离:writer 负责文章,reviewer 负责审查,ops 负责监控。
- 凭据分离:不同 Feishu app、GitHub token、API key 分别放在不同
.env。 - 记忆分离:个人助理记住生活偏好,工程助理记住项目规范,互不串味。
- 网关分离:每个 profile 可以跑自己的 Telegram、Feishu、Slack 或其他 gateway。
- 定时任务分离:日报、监控、写作、发布任务可以在不同 profile 下运行,避免一套 cron 管全部。
怎么创建六个 profile
假设你想把工作拆成六个角色,可以这样建:
hermes profile create orchestrator --description "总控:拆任务、派发、检查结果"
hermes profile create researcher --description "调研:查资料、读文档、整理来源"
hermes profile create writer --description "写作:中英文文章、Crawpress 发布稿"
hermes profile create reviewer --description "审查:代码审查、事实核查、发布前校对"
hermes profile create ops --description "运维:网关、cron、日志、服务状态"
hermes profile create feishu-bot --description "飞书入口:处理飞书私聊和群消息"
如果你想从现有默认 profile 复制模型配置、技能和基础记忆,可以用:
hermes profile create writer --clone --clone-from default
hermes profile create ops --clone --clone-from default
--clone 适合复制基础配置;--clone-all 会复制更多运行状态,通常更适合迁移或备份,不适合日常随手开新角色。
创建后怎么使用
最直接的方式是带 -p:
hermes -p writer chat
hermes -p researcher chat -q "调研 Hermes profile 官方文档"
hermes -p ops doctor
hermes -p feishu-bot gateway start
如果创建时生成了 alias,也可以直接用 profile 名当命令:
writer chat
researcher chat
ops gateway status
还可以把某个 profile 设成默认:
hermes profile use writer
hermes chat
hermes profile use default
这个“默认”只是 CLI 的粘性选择。真正跑网关、跑 cron 时,最好还是显式写 -p profile_name,少给自己留坑。
飞书里面怎么用不同 profile
飞书不是在消息里临时切 profile。更稳的做法,是让不同 profile 各自跑自己的 gateway。
典型步骤是:
hermes -p feishu-bot gateway setup
hermes -p feishu-bot gateway start
这个 profile 的飞书凭据放在:
~/.hermes/profiles/feishu-bot/.env
常见变量包括 FEISHU_APP_ID、FEISHU_APP_SECRET、FEISHU_CONNECTION_MODE、FEISHU_ALLOWED_USERS、FEISHU_HOME_CHANNEL。如果你要同时跑六个飞书机器人,最干净的方式是六个 profile 对六个 Feishu/Lark bot app。每个 app 用自己的凭据,每个 gateway 处理自己的消息。
WebSocket 模式最省心,因为它不需要每个 profile 抢同一个公网 webhook 端口。Webhook 模式也能跑,但默认端口相同;多 profile 同时运行时,要给不同 profile 配不同端口或路径,再用反向代理分发。
还有一个细节:飞书的 open_id 是 app 维度的。同一个人在不同 Feishu app 下可能有不同 open_id。所以你在 FEISHU_ALLOWED_USERS 里做白名单时,不要直接把一个 app 里的 open_id 拿去另一个 app 用。
别把 profile 当成万能隔离
Profile 能隔离记忆、技能、配置、凭据和网关状态,但不能替你做权限治理。一个 ops profile 如果拿着生产 token,就应该少装无关技能;一个 writer profile 如果只负责写文章,就不要放 GitHub 写权限;一个飞书群 bot 如果要让团队使用,就要配白名单和 mention 规则。
实操上,我更建议这样分:
- orchestrator:不直接拿危险凭据,只负责拆任务和检查交付。
- researcher:开 web、browser、文件读取,尽量不给写权限。
- writer:放 Crawpress 发布能力,但不放生产运维 token。
- reviewer:给代码读取、git diff、测试能力,写操作要谨慎。
- ops:只给可信用户使用,负责 gateway、cron、日志和服务重启。
- feishu-bot:作为飞书入口,权限按群和用户收紧。
外部工具也在走同一个方向
Hermes 的 profile 是“整套 agent 运行环境”的隔离。别的 agent 工具也在做类似拆分,只是粒度不同。OpenCode 官方文档把 agent 分成 primary agents 和 subagents,内置 Build、Plan、General、Explore、Scout:Build 能动手改,Plan 默认更保守,Explore 和 Scout 更偏只读调研。OpenAI Codex 的公开仓库把自己定义为运行在终端里的轻量 coding agent。Claude Code 生态里,开发者也常把不同 agent 放在不同任务、不同 worktree、不同权限边界里跑。
这些案例共同说明一件事:真正有用的 agent 不是一个万能聊天框,而是一组有边界的工位。谁能读、谁能写、谁能发布、谁能重启服务,要拆开。Profile 正是 Hermes 里做这件事的基础部件。
X 上补上的一层证据
补看 X 之后,这篇文章要再加一层现实证据:profile 不是文档里的冷门功能,它已经出现在 Hermes 社区讨论里的几个高频方向里。
- Profile 被拿来做多 agent 协调。Teknium 在一条回复里提到,使用
/hermes-agentskill 时,它知道如何运行和协调多个 Hermes Agent profile CLI session,形成真正的 orchestrator。这个说法把 profile 从“配置目录”推进到“可调度的工位”。 - Kanban 把 profile 变成任务网络。Teknium 介绍 Hermes Agent Kanban 时,说它可以跨多个 agent profiles 和依赖关系编排任务;后续又提到一次自动化升级:把一个 prompt 丢进 triage,orchestrator agent 可以拆成子任务、交给 worker、追踪依赖。这里的重点不是看板 UI,而是 profile 开始承担 worker 身份。
- Skill 正在变成跨 agent 的共享层。Nous Research 发过一条关于
xurlskill 的帖子:它允许 Hermes Agent 代表用户读写 X,包括发帖、搜索、拉书签等。另一个 Browserbase skills hub 的帖子,则说明 Hermes 可以接入大量浏览器技能。放在 profile 语境下看,skill 不只是“某个聊天窗口的插件”,而是可以按 profile 分配给 researcher、writer、ops、feishu-bot 的能力包。 - 社区已经在用“Agent OS”语言描述这件事。有用户把 Hermes、Claude、Codex、OpenClaw 放在同一个 dashboard 和 shared memory 语境下讨论。这个说法不能当官方架构文档用,但它说明外部用户真正关心的不是某一个模型,而是不同 agent、不同工具、不同记忆之间怎么协同。
所以,profile 的实用含义可以再说得更硬一点:它不是为了“多开几个 AI 人格”。它是为了让 Hermes、Codex、Claude Code、OpenClaw、浏览器技能、X 技能、Crawpress 发布技能这些东西不要挤在同一张桌子上。能共用的 skill 变成公共工具箱;需要隔离的凭据、记忆、cron 和 gateway 留在各自 profile 里。这个边界划清,后面才谈得上稳定协作。
一套可落地的检查清单
- 先用
hermes profile list看有哪些 profile。 - 用
hermes profile show writer检查路径、模型、gateway、skills、env 是否存在。 - 每个 profile 单独跑
hermes -p name doctor。 - 飞书 profile 单独跑
hermes -p name gateway status。 - 改了配置或工具后,重启对应 profile 的 CLI 或 gateway。
- 发布文章、发消息、跑 cron 这类有副作用的任务,永远确认当前 profile。
参考来源
- Hermes Agent Profiles 文档:https://hermes-agent.nousresearch.com/docs/user-guide/profiles
- Hermes Profile Commands:https://hermes-agent.nousresearch.com/docs/reference/profile-commands
- Hermes Feishu/Lark Messaging:https://hermes-agent.nousresearch.com/docs/user-guide/messaging/feishu
- OpenCode Agents 文档:https://opencode.ai/docs/agents/
- OpenAI Codex 仓库:https://github.com/openai/codex
- Teknium 关于多 profile CLI session 协调的 X 回复:https://x.com/Teknium/status/2043118009485840538
- Teknium 关于 Hermes Agent Kanban 和多 profiles 编排的 X 帖:https://x.com/Teknium/status/2051001156005151226
- Teknium 关于 Kanban 自动化升级的 X 帖:https://x.com/Teknium/status/2056275882780856741
- Nous Research 关于
xurlskill 的 X 帖:https://x.com/NousResearch/status/2056872329561710766 - Nous Research 关于 Browserbase skills hub 的 X 帖:https://x.com/NousResearch/status/2057147726735774203
- 社区关于 Hermes、Claude、Codex、OpenClaw 协同的 X 讨论:https://x.com/cyrilXBT/status/2059506886953804165
最后一句话:如果你只是偶尔问 AI 一个问题,profile 不重要。只要你开始让 AI 接飞书、跑定时任务、发文章、碰代码仓库,它就重要了。因为到那一步,AI 不再是聊天窗口,而是生产环境里一个会行动的账号。
More from WayDigital
Continue through other published articles from the same publisher.
Comments
0 public responses
All visitors can read comments. Sign in to join the discussion.
Log in to comment