Guides & Recipes在 Hermes Agent 上使用 taskflow
在 Hermes Agent 上使用 taskflow
在 Hermes Agent 上通过 MCP 安装 taskflow,用隔离的 Hermes 子代理编排多阶段工作流。
Hermes Agent 是 Nous Research 的开源 coding agent(CLI / TUI / 桌面 / 消息网关)。taskflow 的发布路径是 MCP server:Hermes 发现 taskflow_* 工具,每个 agent phase 会拉起隔离的 hermes chat -q -Q 子进程。
完整说明见仓库 docs/hermes-mcp.md。
安装
已发布 npm 包(发布后)
hermes mcp add taskflow --command npx --args -y -p hermes-taskflow@beta hermes-taskflow-mcp或写入 ~/.hermes/config.yaml / $HERMES_HOME/config.yaml:
mcp_servers:
taskflow:
command: "npx"
args: ["-y", "-p", "hermes-taskflow@beta", "hermes-taskflow-mcp"]
env:
# 需要写文件/终端的 mutating phase 必须打开
# PI_TASKFLOW_HERMES_UNSAFE_YOLO: "1" # required for mutating agent phases
timeout: 600需要 Node.js ≥ 22.19.0。重启 Hermes 后工具会以 mcp_taskflow_* 出现。
monorepo 本地 dogfood(npm 发布前)
pnpm install
pnpm --filter taskflow-core build
pnpm --filter taskflow-mcp-core build
pnpm --filter taskflow-hosts build
pnpm --filter hermes-taskflow build
# MCP command 指向 packages/hermes-taskflow/dist/mcp/bin.js可选 skill:
cp -R packages/hermes-taskflow/plugin/skills/taskflow ~/.hermes/skills/taskflow安全约定
| Phase | 行为 |
|---|---|
| 子进程隔离 | 临时 HERMES_HOME,只带非 secret 的 model/fallback 路由、仅含已路由 inference provider 的 auth.json 和 provider-only dotenv;不继承父级 MCP/skills/memory/rules;RO plugin 仅用于 RO child |
| 只读 whitelist | 本地读 → taskflow_readonly_files;否则 -t taskflow_model_only(禁止省略 -t);READONLY_WEB=1 → 加 web,search |
| 会改环境 | 必须 PI_TASKFLOW_HERMES_UNSAFE_YOLO=1 → --yolo |
| 带 budget 的 flow | 拒绝执行(quiet 模式无 token/cost) |
安装坑: MCP 的 env: 写在 config.yaml,不要依赖 hermes mcp add … --env 塞进 node argv。
下一步
Last updated on