How do I give my LLM workflow persistent context across independent client connections?
说明与用途
将LLM上下文绑定到连接会导致在新连接时丢失。将上下文存储在稳定身份(用户、项目)下,并在每个连接开始时读取,可在独立客户端之间保持持久上下文。
问题
An LLM workflow loses context when a new client connection is made, because context was keyed to the connection or session.
结果
By storing context under a stable identity and reading it at the start of each connection, the LLM workflow retains persistent context across independent client connections.
工作流
- 1. Scheduled job connects to MCP server at 06:00 and writes context under the user/project identity using the Mnemoverse API.
- 2. Chat client connects at 10:00, authenticates with the same API key or OAuth token, reads context from the identity‑scoped store before acting.
- 3. Agent uses the retrieved context to answer queries about duplicate tickets.
证据
Context kept under that ID could be found only by requests that carried the same ID, which means only inside the same session.
The 2026-07-28 revision drops the session: the first major change in its changelog is "Remove protocol-level sessions and the Mcp-Session-Id header from the Streamable HTTP transport".
Memory is scoped to the account behind the key and that "two keys from the same console account share one memory".
Sign in again with the same Mnemoverse account and everything is back, unchanged.
- 记录日期: 2026-10-04T23:55:59.926Z