Files
nexus/wiki/concepts/X-Hermes-Session-Id.md
2026-05-03 05:42:12 +08:00

31 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
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