Files
odyssey/wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构.md

3.3 KiB
Raw Permalink Blame History

tags, created, updated, sources, source_type, source_path, images, image_paths
tags created updated sources source_type source_path images image_paths
素材摘要
2026-09-14 2026-09-14
raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md
notes raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md 0

n8n 调用 Hermes Agents 的工作流架构

Hermes Agent 自带 OpenAI 兼容的 API Server,配合 Profile 多实例,n8n 用 HTTP Request 节点即可调用多个分工不同的专用 Agent,全程无需任何中间件。

基本信息

  • 来源类型:笔记(Claude 对话剪藏,含实战终端记录)
  • 原文位置:raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md
  • 原始链接:https://claude.ai/chat/a18d1fa2-7e98-4f86-bac0-1167281eb151
  • 素材日期:2026-04-20
  • 消化日期:2026-09-14
  • 依赖版本:Hermes 特性需 v0.4.0+;X-Hermes-Session-Id 需 v0.7.0+

核心观点

  1. 不需要写任何胶水代码。Hermes Agent 内置 OpenAI 兼容的 Hermes API Server,默认端口 8642;用 hermes config set API_SERVER_ENABLED true 与 API_SERVER_KEY 开启,再 hermes gateway install / start 起服务,GET /v1/health 返回 {"status":"ok"} 即就绪。
  2. Profile 是隔离多个 Agent 的手段。hermes profile create <name> 为每个角色建独立实例,各自跑在不同端口、持有独立 API key;素材给出的分工示例是 researcher / writer / coder 对应端口 8643 / 8644 / 8645。
  3. n8n 侧零适配。因为每个 Profile 暴露的都是标准 OpenAI 格式接口,n8n 只需一个 HTTP Request 节点:POST 到 /v1/chat/completions,Header 带 Authorization: Bearer <profile 的 key>,Body 的 model 字段填 profile 名。
  4. 多轮上下文靠 header 传递。v0.7.0 起 API Server 支持 X-Hermes-Session-Id,让 chat-completions 客户端跨请求共享同一 session,把多个节点串成有上下文的多步推理链。
  5. 架构极简。整条链路是 n8n → 多个端口的 Agent 实例,中间没有消息队列、网关或适配层。

关键概念

  • Hermes Agent — 提供 Agent 能力的宿主平台
  • Hermes API Server — 把 Agent 暴露为 OpenAI 兼容 HTTP 端点的内置组件
  • Hermes Profile — 多实例隔离机制,多 Agent 分工的基础
  • n8n — 调用方,用 HTTP Request 节点做编排

与其他素材的关联

知识库当前仅此一篇素材,暂无同主题的既有素材可比对。

同一批 nexus 笔记中还存在一份同构素材 [待创建: n8n 调用 openclaw agents 的工作流架构],描述同一模式在另一 Agent 平台上的落地。两者消化后可在 多 Agent 工作流编排 下做横向对比。

原文精彩摘录

好消息!Hermes Agent 内置了 OpenAI 兼容的 API Server,完全不需要额外写任何代码,直接配置开启就行。

你可以用 Profile 的方式为每个用户/角色创建独立的 Hermes 实例,每个 profile 跑在不同端口,配置独立的 API key。

v0.7.0 起 API Server 支持通过 X-Hermes-Session-Id header 来保持会话连续性,让 chat-completions 客户端也能跨请求共享同一个 session。

这套方案完全原生支持,不需要任何额外中间件。

相关页面