acceptodds
Under review as a conference paper at ICLR 2027

LocalMem: Learning to Archive and Retrieve Long-Term Memory for LLM Agents

Abstract

Long-term interactive agents need external memory to retain information across interactions and recover information required by later queries. Existing systems commonly use fixed memory-management rules and general-purpose large language models (LLMs), e.g., GPT-4o, for memory operations. However, fixed rules often store or retrieve misaligned memory evidence, while reliance on cloud-hosted LLMs raises operating costs and privacy risks. We present LocalMem, a plug-and-play memory-management system with separate local language models for memory construction and retrieval. For memory construction, a 4B reinforced Memory Archiver is optimized with the proposed unified memory reward to learn what information to preserve. For memory retrieval, a 4B SFT-trained Memory Enquirer uses progressive retrieval to acquire additional evidence only when needed, improving the accuracy-efficiency trade-off. The proposed LocalMem achieves the state-of-the-art (SOTA) performance, i.e., 69.3 Overall F1 on LoCoMo10 and 81.8% LLM-as-a-Judge accuracy on LongMemEval-S. Controlled ablations show that the trained 4B Archiver outperforms a prompted 122B Archiver by 4.1 F1, while progressive retrieval improves F1 by 1.5 over fixed top- retrieval.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.