Lightweight LLM Agent Memory with Small Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Jiaquan, Zhang, Chaoning, Chen, Shuxu, Huang, Zhenzhen, Zheng, Pengcheng, Wang, Zhicheng, Guo, Ping, Mo, Fan, Bae, Sung-Ho, Zou, Jie, Wei, Jiwei, Yang, Yang
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914498714009600
author Zhang, Jiaquan
Zhang, Chaoning
Chen, Shuxu
Huang, Zhenzhen
Zheng, Pengcheng
Wang, Zhicheng
Guo, Ping
Mo, Fan
Bae, Sung-Ho
Zou, Jie
Wei, Jiwei
Yang, Yang
author_facet Zhang, Jiaquan
Zhang, Chaoning
Chen, Shuxu
Huang, Zhenzhen
Zheng, Pengcheng
Wang, Zhicheng
Guo, Ping
Mo, Fan
Bae, Sung-Ho
Zou, Jie
Wei, Jiwei
Yang, Yang
contents Although LLM agents can leverage tools for complex tasks, they still need memory to maintain cross-turn consistency and accumulate reusable information in long-horizon interactions. However, retrieval-based external memory systems incur low online overhead but suffer from unstable accuracy due to limited query construction and candidate filtering. In contrast, many systems use repeated large-model calls for online memory operations, improving accuracy but accumulating latency over long interactions. We propose LightMem, a lightweight memory system for better agent memory driven by Small Language Models (SLMs). LightMem modularizes memory retrieval, writing, and long-term consolidation, and separates online processing from offline consolidation to enable efficient memory invocation under bounded compute. We organize memory into short-term memory (STM) for immediate conversational context, mid-term memory (MTM) for reusable interaction summaries, and long-term memory (LTM) for consolidated knowledge, and uses user identifiers to support independent retrieval and incremental maintenance in multi-user settings. Online, LightMem operates under a fixed retrieval budget and selects memories via a two-stage procedure: vector-based coarse retrieval followed by semantic consistency re-ranking. Offline, it abstracts reusable interaction evidence and incrementally integrates it into LTM. Experiments show consistent gains across model scales, with an average F1 improvement of about 2.5 over A-MEM on LoCoMo, while achieving higher efficiency and low median latency (83 ms for retrieval and 581 ms end-to-end).
format Preprint
id arxiv_https___arxiv_org_abs_2604_07798
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Lightweight LLM Agent Memory with Small Language Models
Zhang, Jiaquan
Zhang, Chaoning
Chen, Shuxu
Huang, Zhenzhen
Zheng, Pengcheng
Wang, Zhicheng
Guo, Ping
Mo, Fan
Bae, Sung-Ho
Zou, Jie
Wei, Jiwei
Yang, Yang
Artificial Intelligence
Although LLM agents can leverage tools for complex tasks, they still need memory to maintain cross-turn consistency and accumulate reusable information in long-horizon interactions. However, retrieval-based external memory systems incur low online overhead but suffer from unstable accuracy due to limited query construction and candidate filtering. In contrast, many systems use repeated large-model calls for online memory operations, improving accuracy but accumulating latency over long interactions. We propose LightMem, a lightweight memory system for better agent memory driven by Small Language Models (SLMs). LightMem modularizes memory retrieval, writing, and long-term consolidation, and separates online processing from offline consolidation to enable efficient memory invocation under bounded compute. We organize memory into short-term memory (STM) for immediate conversational context, mid-term memory (MTM) for reusable interaction summaries, and long-term memory (LTM) for consolidated knowledge, and uses user identifiers to support independent retrieval and incremental maintenance in multi-user settings. Online, LightMem operates under a fixed retrieval budget and selects memories via a two-stage procedure: vector-based coarse retrieval followed by semantic consistency re-ranking. Offline, it abstracts reusable interaction evidence and incrementally integrates it into LTM. Experiments show consistent gains across model scales, with an average F1 improvement of about 2.5 over A-MEM on LoCoMo, while achieving higher efficiency and low median latency (83 ms for retrieval and 581 ms end-to-end).
title Lightweight LLM Agent Memory with Small Language Models
topic Artificial Intelligence
url https://arxiv.org/abs/2604.07798