LeanMem: Simple and Efficient Long-Term Memory for LLM Agents

📅 2026-08-04
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the limitations of existing long-term memory systems for large language model agents, which uniformly process heterogeneous dialogue content and consequently suffer from high computational overhead or irreversible loss of fine-grained information. To overcome this, the authors propose LeanMem, a novel framework that categorizes memory into three types—concise archives, structured events, and source-anchored records—based on compressibility, temporal dynamics, and fidelity requirements. LeanMem introduces mechanisms for content filtering, selective updating, and query-driven dynamic allocation of retrieval budgets. Evaluated on the LoCoMo and LongMemEval-S benchmarks using GPT-4.1-mini and Qwen3-8B, the approach achieves up to a 15.1-point accuracy improvement while maintaining the lowest or near-lowest costs in terms of construction overhead, inference tokens, and latency.
📝 Abstract
Long-term memory is essential for LLM-based agents to sustain interactions and reliably leverage distant history. However, existing memory systems typically process heterogeneous dialogue content through a uniform summarization and retrieval pipeline, leading to either excessive token consumption or irreversible loss of fine-grained evidence. We argue that historical dialogue content should be handled differently according to its compressibility, temporal dynamics, and fidelity requirements. Based on this insight, we propose LeanMem, a lightweight long-term memory framework. LeanMem first filters out low-value content, then stores informative segments as compact profile memory, temporally structured event memory, or source-grounded record memory, depending on the nature of the information. During maintenance, only dynamically evolving event memories are selectively updated, avoiding redundant consolidation of stable profiles and immutable records. During inference, LeanMem dynamically selects memory types and allocates retrieval budgets according to query-specific evidence demands, assembling relevant evidence on demand. On LoCoMo and LongMemEval-S with GPT-4.1-mini and Qwen3-8B, LeanMem improves accuracy over the strongest memory-based baseline in every setting, by up to 15.1 points, at the lowest or near-lowest construction cost, inference tokens, and latency. The code and datasets are included in the supplementary materials.
Problem

Research questions and friction points this paper is trying to address.

long-term memory
LLM agents
heterogeneous dialogue
token efficiency
fine-grained evidence
Innovation

Methods, ideas, or system contributions that make the work stand out.

long-term memory
memory classification
selective updating
dynamic retrieval
LLM agents