31 lines
1.0 KiB
Markdown
31 lines
1.0 KiB
Markdown
---
|
||
title: "X-Hermes-Session-Id"
|
||
type: concept
|
||
tags: []
|
||
last_updated: 2026-05-02
|
||
---
|
||
|
||
## Definition
|
||
Hermes API Server v0.7.0+ 支持的 HTTP header,通过在请求中传递 `X-Hermes-Session-Id` 使多个独立的 Chat Completions 请求共享同一个会话上下文,实现多轮对话在无状态 HTTP 环境中的连续性。
|
||
|
||
## Details
|
||
- Header 格式:`X-Hermes-Session-Id: <session-identifier>`
|
||
- 适用于:n8n 多步骤工作流、需要多轮推理的任务链
|
||
- session-identifier 可自定义(如 `my-workflow-session-001`)
|
||
- 同一个 session-id 下的多次调用会保持对话历史
|
||
|
||
## Usage
|
||
在 n8n 的 HTTP Request 节点 Header 中添加:
|
||
```
|
||
X-Hermes-Session-Id: my-workflow-session-001
|
||
```
|
||
|
||
## Related
|
||
- [[OpenAI兼容API]] — 该 header 所在的 API 接口
|
||
- [[多Profile隔离]] — Profile 与 Session 的关系:Profile 隔离进程,Session 隔离对话上下文
|
||
- [[工作流编排]] — Session 机制使工作流编排的多步 Agent 调用具有连贯性
|
||
|
||
## Aliases
|
||
- Hermes Session Header
|
||
- Session Continuity Header
|