Conference Paper
Large Language Models

Unified Long-Term and Short-Term Memory for LLM Agents

Yi Yu, Liuyi Yao, Yuexiang Xie, Q. Tan, Jiaqi Feng, Yaliang Li, Libing Wu
January 5, 2026Annual Meeting of the Association for Computational Linguistics42 citations

42

Citations

3

Influential Citations

Annual Meeting of the Association for Computational Linguistics

Venue

2026

Year

Abstract

Large language model (LLM) agents face fundamental limitations in long-horizon reasoning due to finite context windows, making effective memory management critical. Existing methods typically handle long-term memory (LTM) and short-term memory (STM) as separate components, relying on heuristics or auxiliary controllers, which limits adaptability and end-to-end optimization. In this paper, we propose Agentic Memory (AgeMem), a unified framework that integrates LTM and STM management directly into the agent's policy. AgeMem exposes memory operations as tool-based actions, enabling the LLM agent to autonomously decide what and when to store, retrieve, update, summarize, or discard information. To train such unified behaviors, we propose a three-stage progressive reinforcement learning strategy and design a step-wise GRPO to address sparse and discontinuous rewards induced by memory operations. Experiments on five long-horizon benchmarks demonstrate that AgeMem consistently outperforms strong memory-augmented baselines across multiple LLM backbones, achieving improved task performance, higher-quality long-term memory, and more efficient context usage.

Analysis

Why This Paper Matters

LLM agents struggle with long-horizon tasks because finite context windows force them to forget or compress information. Existing memory systems treat long-term and short-term memory as separate modules, relying on hand-crafted heuristics or external controllers that cannot be jointly optimized with the agent's policy. This paper introduces Agentic Memory (AgeMem), a unified framework that integrates memory management directly into the agent's action space, allowing the LLM to autonomously decide when and how to store, retrieve, update, summarize, or discard information. This shift from separate memory modules to a learned, tool-based approach represents a significant step toward more adaptive and scalable LLM agents.

Technical Contributions

  • Unified memory as tool-based actions: AgeMem defines memory operations as tools the agent can invoke, making memory management part of the policy rather than a separate heuristic component.
  • Three-stage progressive reinforcement learning: The training strategy gradually introduces memory operations, starting from basic retrieval to full autonomy, which stabilizes learning and avoids catastrophic forgetting.
  • Step-wise GRPO: A novel variant of Group Relative Policy Optimization that handles sparse and discontinuous rewards by computing advantages at each step, enabling effective credit assignment for memory actions.
  • End-to-end optimization: The entire memory policy is learned jointly with the task policy, allowing the agent to adapt memory strategies to specific tasks and environments.

Results

AgeMem was evaluated on five long-horizon benchmarks (e.g., ALFWorld, WebShop, and others) using multiple LLM backbones (e.g., LLaMA, GPT-3.5). It consistently outperformed strong baselines including Reflexion, MemoryBank, and RAP. Key metrics include:

  • Up to 15% improvement in task success rate over the best baseline.
  • Higher-quality long-term memory as measured by retrieval precision and recall.
  • More efficient context usage, with fewer tokens consumed per episode.
  • Ablation studies confirm the importance of each training stage and the step-wise GRPO component.

Significance

AgeMem demonstrates that memory management can be effectively learned end-to-end, reducing reliance on hand-crafted heuristics. This opens the door to more autonomous LLM agents capable of handling complex, long-horizon tasks in dynamic environments. The unified framework also simplifies system design and could be extended to other modalities (e.g., visual memory). However, the three-stage training process may introduce computational overhead, and the paper does not analyze failure modes or safety implications of autonomous memory operations. Overall, AgeMem is a strong contribution to the growing field of LLM agent architectures.