让大模型记忆像人一样主动连接知识,动态进化。
A-MEM: Agentic Memory for LLM Agents

- 用Zettelkasten方法构建可动态链接的知识网络
- 新记忆加入时自动更新旧记忆的上下文与属性
- 适配多种任务,提升大模型记忆自适应能力
尽管大语言模型(LLM)代理能有效使用外部工具完成复杂现实任务,但仍需记忆系统来利用历史经验。现有记忆系统仅支持基础存取,缺乏高级组织能力,且固定结构限制了跨任务适应性。为此,本文提出一种新型代理式记忆系统(A-MEM),可主动组织记忆。基于Zettelkasten方法,系统通过动态索引与链接创建互联知识网络。新增记忆时生成含上下文、关键词、标签等结构化属性的笔记,并分析历史记忆以建立有意义的关联。此过程支持记忆演化:新记忆可触发已有记忆的上下文与属性更新,使记忆网络持续优化理解。该方法结合了Zettelkasten的结构化原则与代理驱动的灵活性,实现更自适应、情境感知的记忆管理。在六种基础模型上的实验证明其优于现有最佳基线。评估代码见https://github.com/WujiangXu/A-mem,记忆系统源码见https://github.com/WujiangXu/A-mem-sys。
原文摘要 · Abstract (English)
While large language model (LLM) agents can effectively use external tools for complex real-world tasks, they require memory systems to leverage historical experiences. Current memory systems enable basic storage and retrieval but lack sophisticated memory organization, despite recent attempts to incorporate graph databases. Moreover, these systems' fixed operations and structures limit their adaptability across diverse tasks. To address this limitation, this paper proposes a novel agentic memory system for LLM agents that can dynamically organize memories in an agentic way. Following the basic principles of the Zettelkasten method, we designed our memory system to create interconnected knowledge networks through dynamic indexing and linking. When a new memory is added, we generate a comprehensive note containing multiple structured attributes, including contextual descriptions, keywords, and tags. The system then analyzes historical memories to identify relevant connections, establishing links where meaningful similarities exist. Additionally, this process enables memory evolution - as new memories are integrated, they can trigger updates to the contextual representations and attributes of existing historical memories, allowing the memory network to continuously refine its understanding. Our approach combines the structured organization principles of Zettelkasten with the flexibility of agent-driven decision making, allowing for more adaptive and context-aware memory management. Empirical experiments on six foundation models show superior improvement against existing SOTA baselines. The source code for evaluating performance is available at https://github.com/WujiangXu/A-mem, while the source code of the agentic memory system is available at https://github.com/WujiangXu/A-mem-sys.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。