LangChain 教育工程师 Jess Weng 在 Deep Agents 中演示了四种管理智能体记忆的方式:大工具结果存入文件、模型只接收简短预览和路径;技能仅以名称和描述呈现,按需加载完整指令;子智能体在独立上下文中处理聚焦问题;对话增长时压缩旧内容、保留近期消息。
How much of the past in agent memory should enter the present?
Once we decide what to keep, we need to work out how the agent can access it.
@jess_weng18, an education engineer at @LangChain, showed several ways to manage this in Deep Agents:
1. A large tool result can be saved to a file. The model receives a short preview and a path to read more as needed.
2. A skill appears as a name and description, with full instructions loaded only when the task calls for them.
3. A subagent can work through a focused problem in its own context.
4. As the conversation grows, older material can be condensed while recent messages stay unchanged.
And the most important thing:
Continuity depends on the architecture around the model: where information lives, how long it survives, and how a later run finds it.
Jess Weng even showed that a persistent memory file could be read by another model.
But a condensed memory is easier to use and also easier to misuse because the agent may miss important details. So →
Agents need to recognize when the summary is insufficient, and we still need to figure out how much context and experience we can leave out.
Here I explain six more perspectives on how to turn an agent’s experience into better work and build agent memory. They are practical and so really worth your attention.: https://www.turingpost.com/p/agent-memory-experience-organizational-belief
来源:Turing Post (Ksenia Se) · x.com