feat(odyssey): 消化《n8n 调用 Hermes Agents 的工作流架构》素材,新增 1 素材页 + 4 实体页 + 1 主题页

This commit is contained in:
2026-09-14 22:29:56 +08:00
parent 6491f39d12
commit b0bbdb0a7b
10 changed files with 388 additions and 13 deletions

View File

@@ -1,4 +1,10 @@
{ {
"version": 1, "version": 1,
"entries": {} "entries": {
"raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md": {
"hash": "sha256:2537ce23e5cf284d1f1a8bb52a1a2db595b70eefd33042929da2fbf3979ee57b",
"ingested_at": "2026-09-14T14:27:51Z",
"source_page": "wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构.md"
}
}
} }

View File

@@ -7,8 +7,8 @@
## 概览 ## 概览
- 主题:通用个人知识库 - 主题:通用个人知识库
- 素材总数:0 - 素材总数:1
- Wiki 页面总数:0 - Wiki 页面总数:6
--- ---
@@ -16,7 +16,10 @@
> 人物、组织、概念、工具等 > 人物、组织、概念、工具等
(暂无) - [[Hermes Agent]] — Nous Research 出品的 Agent 平台,内置 OpenAI 兼容 API Server
- [[Hermes API Server]] — 把 Agent 暴露为 OpenAI 兼容 HTTP 端点的内置组件,默认端口 8642
- [[Hermes Profile]] — 多实例隔离机制,每个 profile 独立端口与 API key
- [[n8n]] — 开源工作流自动化平台,通过 HTTP Request 节点编排多个 Agent
--- ---
@@ -24,7 +27,7 @@
> 研究主题、知识领域 > 研究主题、知识领域
(暂无) - [[多 Agent 工作流编排]] — 多个专职 Agent 如何被组织进自动化流程:编排、隔离与上下文传递
--- ---
@@ -32,7 +35,7 @@
> 每个消化过的素材都有一篇摘要 > 每个消化过的素材都有一篇摘要
(暂无) - [[wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构]] — Hermes 自带 OpenAI 兼容 API Server + Profile 多实例,n8n 零中间件调用多个专职 Agent
--- ---

22
log.md
View File

@@ -9,3 +9,25 @@
- **操作**:创建知识库 - **操作**:创建知识库
- **主题**:通用个人知识库 - **主题**:通用个人知识库
- **状态**:完成 - **状态**:完成
---
## 2026-09-14 ingest | n8n 调用 Hermes Agents 的工作流架构
- **素材来源**:nexus 笔记(Claude 对话剪藏),原文 `~/Workspace/nexus/knowledgebase/n8n调用hermes agents的工作流架构.md`
- **原始链接**:https://claude.ai/chat/a18d1fa2-7e98-4f86-bac0-1167281eb151
- **处理级别**:完整处理(5750 字节,>1000 字)
- **缓存**:`MISS:no_entry` → 处理后 `HIT`
- **图片**:0 张
- **新增**:
- `raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md`
- `wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构.md`
- `wiki/entities/Hermes Agent.md`
- `wiki/entities/Hermes API Server.md`
- `wiki/entities/Hermes Profile.md`
- `wiki/entities/n8n.md`
- `wiki/topics/多 Agent 工作流编排.md`
- **更新**:
- `index.md`
- `wiki/overview.md`
- **待创建**:`n8n 调用 openclaw agents 的工作流架构`(同批 nexus 素材,尚未消化)

View File

@@ -0,0 +1,67 @@
---
tags: [实体]
created: 2026-09-14
updated: 2026-09-14
sources: [raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md]
---
# Hermes API Server
> [[Hermes Agent]] 的内置组件,把 Agent 暴露成 OpenAI 兼容的 HTTP 端点,默认端口 8642。
## 简介
Hermes API Server 是 [[Hermes Agent]] 自带的 HTTP 服务层,遵循 OpenAI 的 `chat/completions` 协议。任何能调用 OpenAI 接口的客户端——[[n8n]]、脚本、其他 Agent——都能不加改造地调用它。这是 Hermes 接入外部编排系统的关键,也是「不需要中间件」这个结论的来源。
## 关键信息
- **类型**:概念 / 组件
- **领域**:AI Agent 服务化
- **相关概念**:[[Hermes Agent]]、[[Hermes Profile]]、[[n8n]]
- **默认端口**:`8642`
- **协议**:OpenAI 兼容(`/v1/chat/completions`、`/v1/health`)
## 详细内容
### 开启与配置
```bash
hermes config set API_SERVER_ENABLED true
hermes config set API_SERVER_KEY <your-secret-key>
hermes gateway restart
```
`API_SERVER_KEY` 是必填项,客户端通过 `Authorization: Bearer <key>` 携带。若要跨机器访问,还需把 `API_SERVER_HOST` 设为 `0.0.0.0`(默认只监听本机)。
### 调用格式
```json
{
"model": "hermes-agent",
"messages": [{ "role": "user", "content": "Hello!" }]
}
```
`model` 字段填实例 / profile 名,返回体是标准 OpenAI 响应结构,带 `usage` 的 token 统计。
### 多轮会话连续性
v0.7.0 起支持 `X-Hermes-Session-Id` 请求头:
```
X-Hermes-Session-Id: my-workflow-session-001
```
同一个 id 的多次请求共享同一个 session,因此 chat-completions 客户端也能跨请求保留上下文。这让 [[n8n]] 里用多个 HTTP Request 节点串起来的流程可以具备记忆,适合多步推理任务链。
<!-- confidence: EXTRACTED -->
## 不同素材中的观点
- [[wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构]]:API Server 是「完全原生支持」的核心,架构中位于 n8n 与各 Agent 实例之间。
## 相关页面
- [[Hermes Agent]]
- [[Hermes Profile]]
- [[n8n]]
- [[多 Agent 工作流编排]]

View File

@@ -0,0 +1,51 @@
---
tags: [实体]
created: 2026-09-14
updated: 2026-09-14
sources: [raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md]
---
# Hermes Agent
> Nous Research 出品的 Agent 平台,内置 OpenAI 兼容的 API Server,可被外部工作流引擎直接当作 LLM 端点调用。
## 简介
Hermes Agent 是一个可本地部署的 Agent 运行时。它同时具备两副面孔:给人用的命令行 / 聊天 Agent,以及给机器调用的 HTTP 服务。后者由内置的 [[Hermes API Server]] 提供,因此把它接进外部编排工具时不需要写任何适配代码。
## 关键信息
- **类型**:工具 / 平台
- **领域**:AI Agent 运行时、工作流自动化
- **相关概念**:[[Hermes API Server]]、[[Hermes Profile]]、[[n8n]]
- **版本门槛**:基础 API Server 特性需 v0.4.0+;多轮会话 header 需 v0.7.0+
## 详细内容
### 服务化能力
Hermes Agent 将自身暴露为一个 OpenAI 兼容的 HTTP 端点,默认端口 `8642`。开启步骤:
```bash
hermes config set API_SERVER_ENABLED true
hermes config set API_SERVER_KEY <your-secret-key>
hermes gateway install # 安装为系统服务
hermes gateway start # 启动
```
健康检查返回 `{"status":"ok","platform":"hermes-agent","version":"..."}` 即就绪。
### 多实例能力
通过 [[Hermes Profile]] 可在同一台机器上运行多个互相隔离的 Hermes 实例,各自占用不同端口、持有独立 API key。这是 [[多 Agent 工作流编排]] 中「一个角色一个 Agent」的实现基础。
## 不同素材中的观点
- [[wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构]]:强调「完全不需要额外写任何代码」「完全原生支持,不需要任何额外中间件」。
## 相关页面
- [[Hermes API Server]]
- [[Hermes Profile]]
- [[n8n]]
- [[多 Agent 工作流编排]]

View File

@@ -0,0 +1,58 @@
---
tags: [实体]
created: 2026-09-14
updated: 2026-09-14
sources: [raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md]
---
# Hermes Profile
> [[Hermes Agent]] 的多实例隔离机制:每个 profile 是一套独立的配置、端口和 API key。
## 简介
Profile 让同一台机器上并存多个互不干扰的 Hermes 实例。每个 profile 有自己的配置目录、自己的 [[Hermes API Server]] 端口、自己的 API key,因此可以被当作一个「专职 Agent」对外提供服务。它是 [[多 Agent 工作流编排]] 中角色分工的落地方式。
## 关键信息
- **类型**:概念 / 机制
- **领域**:AI Agent 运行时、多实例隔离
- **相关概念**:[[Hermes Agent]]、[[Hermes API Server]]、[[n8n]]
- **命令形态**:`hermes profile create <name>`,`hermes -p <name> <subcommand>`
## 详细内容
### 创建与配置
```bash
hermes profile create agent-researcher
hermes -p agent-researcher config set API_SERVER_ENABLED true
hermes -p agent-researcher config set API_SERVER_PORT 8643
hermes -p agent-researcher config set API_SERVER_KEY key-researcher
```
关键点:`-p <profile>` 前缀让所有后续命令作用于该 profile,因此端口和密钥都是 per-profile 的。
### 多角色分工示例
素材给出的分工骨架——调研、写作、编码各占一个 profile,各自独立端口:
| Profile | 端口 | 职责 |
|---|---|---|
| agent-researcher | 8643 | 搜索 / 调研 |
| agent-writer | 8644 | 内容生成 |
| agent-coder | 8645 | 代码任务 |
启动方式:`hermes -p <name> gateway &`,三个 profile 各起一个 gateway。
<!-- confidence: INFERRED -->
## 不同素材中的观点
- [[wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构]]:Profile 被用作「为每个用户/角色创建独立的 Hermes 实例」的手段,每实例独立端口与 API key。
## 相关页面
- [[Hermes Agent]]
- [[Hermes API Server]]
- [[多 Agent 工作流编排]]

60
wiki/entities/n8n.md Normal file
View File

@@ -0,0 +1,60 @@
---
tags: [实体]
created: 2026-09-14
updated: 2026-09-14
sources: [raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md]
---
# n8n
> 开源工作流自动化平台,通过 HTTP Request 节点把多个 Agent 串成业务流程。
## 简介
n8n 是一个可视化的工作流 / 自动化编排工具。在这个知识库的语境里,它的角色是**调用方**:用 HTTP Request 节点去请求 [[Hermes API Server]],从而把 [[Hermes Profile]] 提供的多个专职 Agent 组织成一条业务流水线。
## 关键信息
- **类型**:工具 / 平台
- **领域**:工作流自动化、系统集成
- **相关概念**:[[Hermes Agent]]、[[Hermes API Server]]、[[Hermes Profile]]
- **用到的节点**:HTTP Request
## 详细内容
### 调用 Hermes Agent 的节点配置
| 字段 | 值 |
|---|---|
| Method | `POST` |
| URL | `http://<host>:8643/v1/chat/completions` |
| Header: Authorization | `Bearer <该 profile 的 key>` |
| Header: Content-Type | `application/json` |
| Header: X-Hermes-Session-Id | 可选,用于跨节点共享上下文 |
Body 用 n8n 表达式把上游节点的数据注入:
```json
{
"model": "agent-researcher",
"messages": [
{ "role": "system", "content": "你是一个专门负责网络调研的Agent,请搜索并总结信息" },
{ "role": "user", "content": "{{ $json.task }}" }
]
}
```
因为服务端是 OpenAI 兼容协议,n8n 侧不需要任何自定义 SDK 或适配节点,一个通用 HTTP Request 节点即可。
### 在本知识库中的延伸
nexus 笔记里还有一份同构素材描述了 n8n 调用另一 Agent 平台的方案,可作为跨平台横向对比的素材。
## 不同素材中的观点
- [[wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构]]:n8n 处于架构的入口端,向下扇出到多个端口的 Agent 实例。
## 相关页面
- [[Hermes API Server]]
- [[多 Agent 工作流编排]]

View File

@@ -20,7 +20,9 @@
## 知识地图 ## 知识地图
(随着素材积累,这里会展示知识库覆盖的主要方向) 当前覆盖 1 个主题方向:
- **[[多 Agent 工作流编排]]** —— 把多个专职 Agent 接进自动化流程。已沉淀 [[Hermes Agent]]、[[Hermes API Server]]、[[Hermes Profile]]、[[n8n]] 四个实体,形成「平台 → 服务端点 → 实例隔离 → 上层编排」的完整链路。
--- ---
@@ -28,14 +30,14 @@
| 类型 | 数量 | 查看 | | 类型 | 数量 | 查看 |
|------|------|------| |------|------|------|
| 素材 | 0 | [[素材摘要]] | | 素材 | 1 | [[wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构]] |
| 实体 | 0 | [[实体页]] | | 实体 | 4 | [[Hermes Agent]]、[[Hermes API Server]]、[[Hermes Profile]]、[[n8n]] |
| 主题 | 0 | [[主题页]] | | 主题 | 1 | [[多 Agent 工作流编排]] |
| 对比 | 0 | [[对比分析]] | | 对比 | 0 | (暂无) |
| 综合 | 0 | [[综合分析]] | | 综合 | 0 | (暂无) |
--- ---
## 最近更新 ## 最近更新
(暂无) - **2026-09-14** — ingest《n8n 调用 Hermes Agents 的工作流架构》:新增 1 篇素材摘要、4 个实体页、1 个主题页

View File

@@ -0,0 +1,62 @@
---
tags: [素材摘要]
created: 2026-09-14
updated: 2026-09-14
sources: [raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md]
source_type: notes
source_path: raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md
images: 0
image_paths: []
---
# 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。
<!-- confidence: INFERRED -->
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。
> 这套方案完全原生支持,不需要任何额外中间件。
## 相关页面
- [[多 Agent 工作流编排]]
- [[Hermes API Server]]
- [[Hermes Profile]]
- [[n8n]]

View File

@@ -0,0 +1,44 @@
---
tags: [主题]
created: 2026-09-14
updated: 2026-09-14
sources: [raw/notes/2026-09-14-n8n调用hermes-agents工作流架构.md]
---
# 多 Agent 工作流编排
> 如何把多个专职 Agent 组织进一条自动化流程:谁负责编排、Agent 之间怎么隔离、上下文如何跨步骤传递。
## 核心观点
编排的本质是**让每个 Agent 只做一件事,再由外层流程把它们串起来**。因此技术选型集中在三个问题上:
1. **Agent 怎么被调用** —— 只要 Agent 平台提供 OpenAI 兼容端点,调用方就不需要专用 SDK。[[Hermes API Server]] 即属此类,使 [[n8n]] 用一个通用 HTTP Request 节点就能接入。
2. **多个 Agent 怎么隔离** —— 需要各自独立的配置、端口与密钥,避免互相污染上下文。[[Hermes Profile]] 提供了这种隔离。
3. **上下文怎么跨步骤传递** —— 无状态调用会让多步推理断链。`X-Hermes-Session-Id` 这类 session header 是常见解法。
## 素材汇总
| 素材 | 核心贡献 | 详见 |
|---|---|---|
| n8n 调用 Hermes Agents 的工作流架构 | 给出 n8n + Hermes Profile + API Server 的完整零中间件方案 | [[wiki/sources/2026-09-14-n8n调用hermes-agents工作流架构]] |
## 关键概念
- [[Hermes Agent]] — 提供 Agent 能力的宿主平台
- [[Hermes API Server]] — OpenAI 兼容端点,调用方的统一入口
- [[Hermes Profile]] — 多实例隔离,角色分工的落地方式
- [[n8n]] — 本主题中承担编排职责的上层工具
## 未解决的问题
- **会话隔离与并发**:`X-Hermes-Session-Id` 让同一工作流共享上下文,但并发执行同一工作流的多条分支时如何避免串话,素材未涉及。
- **失败与重试**:Agent 调用超时、返回不可用时,n8n 侧的补偿策略素材未讨论。
- **成本与配额**:每个 profile 实例的 token 消耗如何归集与限额,素材未提及。
- **跨平台对比**:同为「n8n 调用 Agent」的模式在 Hermes 与 openclaw 上的差异,尚无素材支撑。
## 相关页面
- [[Hermes API Server]]
- [[Hermes Profile]]
- [[n8n]]