A-Mem: Agentic Memory for LLM Agents

Wujiang Xu, Zujie Liang, Kai Mei, Hang Gao, Juntao Tan, Yongfeng Zhang

Introduction

Large Language Model (LLM) agents have demonstrated remarkable proficiency in tool use and short-term reasoning. However, they frequently encounter a "goldfish memory" bottleneck when tasked with long-term interactions. Current memory architectures typically fall into two categories: passive vector stores that act as basic search engines, or rigid systems based on predefined graph schemas. These approaches lack the adaptability required to reorganize knowledge as new concepts or rules are introduced.

To address these limitations, we present A-Mem, an agentic memory system that empowers LLMs to dynamically organize, link, and evolve their own internal knowledge bases. By adopting the principles of the Zettelkasten method, A-Mem transforms memory management from a static storage problem into an active reasoning task.

The A-Mem Framework

A-Mem treats memory management as an agentic process consisting of four distinct stages:

1. Note Construction

Inspired by the Zettelkasten method of atomic note-taking, every interaction is processed into a structured "atomic note." Rather than storing raw transcripts, the LLM generates specific attributes for each note, including keywords, tags, and a concise contextual description. This ensures that each piece of information is self-contained yet metadata-rich.

When a new memory is ingested, A-Mem does not store it in isolation. The system retrieves relevant historical memories and uses the LLM to determine potential relationships. This process creates "boxes" or clusters of related ideas. A significant feature of A-Mem is its non-hierarchical flexibility; a single memory can reside in multiple boxes simultaneously, reflecting the multi-faceted nature of information.

3. Memory Evolution

The most distinctive feature of A-Mem is its capacity for evolution. As the agent encounters new information that clarifies or expands upon previous experiences, it can trigger updates to existing notes. The agent may rewrite descriptions or update tags to reflect a more mature understanding of past events, mimicking the way human memory integrates new learning with old experiences.

4. Retrieval

Retrieval in A-Mem combines standard dense vector embedding searches with the power of the linking system. When a specific note is retrieved, the system automatically pulls in its "linked neighbors." This provides the agent with a pre-organized, high-context subset of data, significantly reducing the noise often found in traditional RAG (Retrieval-Augmented Generation) systems.

Experimental Evaluation

The efficacy of A-Mem was evaluated across six foundation models, including GPT-4o, Llama 3.2, and Qwen 2.5. Testing was conducted using two primary benchmarks:

  • LoCoMo: A dataset of long-form dialogues averaging 9,000 tokens across up to 35 sessions, designed to test multi-hop and temporal reasoning.
  • DialSim: A new dataset featuring multi-party dialogues from television series (Friends, The Big Bang Theory), covering 1,300 sessions over a simulated five-year period.

Results and Discussion

A-Mem consistently outperformed state-of-the-art baselines such as MemGPT and MemoryBank across several key metrics:

  • Multi-Hop Reasoning: In tasks requiring the connection of disparate facts across multiple sessions, A-Mem achieved up to double the performance of traditional memory systems.
  • Token Efficiency: By organizing information into logical clusters and retrieving only the most relevant "boxes," A-Mem reduced token usage by 85-93% compared to full-context baselines. The cost per memory operation was minimized to approximately $0.0003.
  • Clustering Coherence: T-SNE visualizations of memory embeddings indicated that A-Mem’s agentic organization produced significantly tighter and more coherent clusters than standard base memory systems, validating the effectiveness of the LLM-driven storage strategy.

Limitations and Future Work

While A-Mem represents a significant step forward, several challenges remain. The system's performance is inherently tied to the reasoning capabilities of the underlying LLM; weaker models may struggle to create meaningful links or summaries. Additionally, the current implementation is text-only. Future research will explore multimodal integration (images and audio) and investigate methods to mitigate the risk of hallucinations during the memory evolution phase.

Conclusion

A-Mem shifts the focus of agentic research from "what to retrieve" to "how to store." By giving agents agency over their own "Second Brain," A-Mem enables superior multi-hop reasoning and dramatic efficiency gains, paving the way for more capable and context-aware long-term AI assistants.

Summary updated

BibTeX
@inproceedings{xu2025mem,
  author = {Wujiang Xu and Zujie Liang and Kai Mei and Hang Gao and Juntao Tan and Yongfeng Zhang},
  title = {{A-Mem: Agentic Memory for LLM Agents}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=FiM0M8gcct},
}
Figure