Preprint
Large Language Models

Agentic Memory for LLM Agents

Wujiang Xu, Zujie Liang, K. Mei, Hang Gao, Juntao Tan, Yongfeng Zhang
February 17, 2025858 citations

858

Citations

127

Influential Citations

Venue

2025

Year

Abstract

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.

Analysis

Why This Paper Matters

LLM agents are increasingly used for complex tasks that require leveraging past experiences. However, existing memory systems are often static, relying on basic storage and retrieval, which limits their adaptability across diverse tasks. This paper addresses a critical gap by proposing an agentic memory system that dynamically organizes memories, moving beyond fixed operations and structures.

The significance lies in its integration of the Zettelkasten method—a proven knowledge management technique—with agent-driven decision making. This combination allows the memory system to not only store and retrieve but also to evolve, creating a more sophisticated and context-aware memory network. As LLM agents become more prevalent in real-world applications, such adaptive memory systems are essential for improving their performance and reliability.

Technical Contributions

  • Zettelkasten-inspired memory organization: The system generates comprehensive notes with structured attributes (context, keywords, tags) for each new memory, enabling rich indexing and linking.
  • Dynamic linking: When a new memory is added, the system analyzes historical memories to identify and establish meaningful connections, creating an interconnected knowledge network.
  • Memory evolution: The integration of new memories triggers updates to existing memories' contextual representations and attributes, allowing the network to continuously refine its understanding.
  • Agentic flexibility: The system leverages agent-driven decision making to adapt memory management to the task at hand, overcoming the rigidity of previous systems.
  • Open-source availability: Both the evaluation code and the memory system code are publicly available, facilitating reproducibility and further research.

Results

The abstract reports that empirical experiments on six foundation models show superior improvement against existing state-of-the-art baselines. However, specific quantitative metrics (e.g., accuracy, F1, or task success rates) are not provided in the abstract. The consistent improvement across multiple foundation models suggests the method's generalizability and robustness.

Significance

This work has significant implications for the field of LLM agents. By introducing a memory system that can dynamically organize and evolve, it enables agents to better leverage historical experiences, which is crucial for complex real-world tasks. The integration of Zettelkasten principles with agentic decision-making offers a new paradigm for memory design, potentially influencing future research in memory-augmented AI systems.

Moreover, the open-source code allows practitioners to adopt and build upon this approach, accelerating innovation. As LLM agents become more autonomous and are deployed in diverse domains, adaptive memory systems like this will be key to achieving higher levels of performance and adaptability.