A-Mem: Agentic Memory for LLM Agents¶
🕒 Published (v1): 2025-01-01 · Source: NeurIPS · Venue: NeurIPS 2025 · link
Ask a follow-up
Open an assistant pre-loaded with this paper's context.
💬 Ask ChatGPT✦ Ask Claude
TL;DR¶
A-Mem introduces an agentic memory system for LLM agents that dynamically organizes memories via Zettelkasten-inspired interconnected notes, autonomous link generation, and memory evolution—without requiring predefined schemas or fixed workflows. Evaluated on six foundation models across long-term conversational benchmarks, it consistently outperforms existing memory baselines while using 85–93% fewer tokens than comparable methods.
Problem¶
Existing LLM agent memory systems (MemGPT, MemoryBank, Mem0) require developers to predefine memory structures, storage points, and retrieval timing. Graph-database approaches rely on fixed schemas that cannot forge novel connections as knowledge evolves. This rigidity prevents generalization across diverse tasks and limits effectiveness in long-term, open-ended interactions.
Method¶
Each incoming memory is converted into a structured note máµ¢ = {cáµ¢, táµ¢, Káµ¢, Gáµ¢, Xáµ¢, eáµ¢, Láµ¢} containing raw content, timestamp, LLM-generated keywords, tags, contextual description, a dense embedding (all-minilm-l6-v2), and a link set. Three pipeline stages follow:
- Link Generation: Cosine-similarity retrieval finds top-k nearest historical notes; an LLM then decides which to link by analyzing shared attributes and relationships beyond embedding similarity.
- Memory Evolution: For each retrieved neighbor, the LLM re-evaluates and optionally rewrites its contextual description, keywords, and tags given the new memory, enabling the network to develop higher-order attributes over time.
- Retrieval: At inference, query embedding is matched against all note embeddings; top-k notes plus their pre-established links are injected into the agent context.
Default k=10; embedding + LLM calls cost ~1,200 tokens per memory operation.
Key Contributions¶
- Zettelkasten-inspired agentic memory architecture that requires no predefined schemas or fixed workflows.
- Autonomous link generation module: embedding-based candidate filtering followed by LLM-driven relationship analysis.
- Memory evolution mechanism: existing notes update their attributes when new memories are integrated, enabling emergent higher-order knowledge structures.
- Demonstrated 85–93% token reduction vs. LoCoMo/MemGPT baselines (~1,200 vs. ~16,900 tokens/operation), costing <$0.0003 per operation with GPT-4o-mini.
- Scalability validation: retrieval time grows from 0.31 µs to 3.70 µs at 1M entries (O(N) space, sub-linear time growth in practice).
Results¶
LoCoMo dataset (six models): - A-Mem achieves average ranking 1.0–1.6 across Llama 3.2 1B/3B and Qwen2.5 1.5B/3B; competitive on GPT-4o and GPT-4o-mini. - Llama 3.2 3B, Temporal category: A-Mem F1=45.85 vs. MemGPT 25.52, LoCoMo 18.41. - GPT-4o-mini, Multi-Hop: A-Mem F1=27.02 vs. MemGPT 5.32 (>2× improvement stated explicitly). - GPT-4o, Single-Hop: A-Mem F1=28.51, MemGPT 10.16, LoCoMo 8.37.
DialSim dataset: - A-Mem F1=3.45 vs. LoCoMo 2.55 (+35%) and MemGPT 1.18 (+192%). - ROUGE-2: A-Mem 3.60 vs. LoCoMo 0.90, MemGPT 0.42. - SBERT Similarity: A-Mem 19.51 vs. LoCoMo 15.76, MemGPT 8.54.
Ablation (GPT-4o-mini): - Removing both LG and ME: Temporal F1 drops from 45.85 → 24.55; Multi-Hop from 27.02 → 9.65. - Removing only ME: Temporal F1 = 31.24 (intermediate), confirming both modules are necessary.
Limitations¶
- Memory organization quality depends on the capabilities of the underlying LLM; different base models produce varying contextual descriptions and link structures.
- Each memory write requires multiple LLM calls (note construction + link generation + evolution), increasing write latency relative to passive systems (avg. 5.4s with GPT-4o-mini; 1.1s with local Llama 3.2 1B).
- Text-only: no multimodal memory support (images, audio) in current implementation.
- Evaluation is confined to long-term conversational QA benchmarks (LoCoMo, DialSim); generalization to other agent task types (tool use, web navigation, code execution) is not directly demonstrated.
Relevance to Agentic AI / LLM Agents¶
Long-term memory is a fundamental bottleneck for agents operating across extended sessions; A-Mem directly addresses the rigidity of schema-bound systems by making memory organization itself an agent-driven process. The Zettelkasten-style evolving link network is a concrete architectural alternative to both flat vector stores and predefined graph schemas, offering a path toward agents that accumulate and restructure knowledge autonomously. The 85–93% token reduction is practically significant for cost-sensitive deployments of persistent agents. This work complements agentic RAG research by shifting agency from the retrieval phase to the storage/evolution phase, a meaningful architectural distinction for the field.