Learning What to Remember: Observability-Safe Memory Retention via Constrained Optimization for Long-Horizon Language Agents
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Long-horizon language agents accumulate observations, reasoning traces, and retrieved facts exceeding context windows, making memory retention a fundamental resource-allocation problem. Existing systems treat retention as local and do not model long-term consequences under observability constraints. To fill this gap, we formulate memory retention as a constrained stochastic optimization with budget feasibility, evidence utility, and delayed costs including miss, reacquisition, and stale penalties. We show this multi-step problem is NP-hard, making exact solution intractable. Moreover, deployment decisions must be made under partial observability. To address these challenges, we propose OSL-MR (Observability-Safe Learning for Memory Retention), a learning-augmented framework that enforces a strict separation between online-observable features and offline-available supervision. OSL-MR combines an evidence learner trained from realized evidence with a Mixed-Score heuristic that serves as a deployable online-safe baseline and an inductive prior. The policy learns query-conditioned evidence from interaction data and remains deployable under the same constraints. Experiments on LoCoMo and LongMemEval show OSL-MR outperforms recency-based, Generative Agents-style, and other heuristic baselines, especially under tight budgets. The Mixed-Score prior improves precision and recall, and sensitivity analysis shows robustness across cost settings. On small solvable instances, single-step optimization is insufficient to anticipate future demand shifts, while OSL-MR stays significantly closer to the dynamic-programming optimum, confirming the necessity of the sequential formulation and reinforcing our learning-guided approximation. These results establish constrained stochastic optimization and optimization-guided learning as a principled foundation for memory management in long-horizon agents.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 22 of its 30 references that are in the map. First posted on arXiv 9 Jun 2026.
Builds on
22 of 30 references.
Closest ancestors · 1
Same direction, newest first
Other references · 21
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,568
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agentscited by 830
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memorycited by 779
- 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 707
- 2024A Survey on the Memory Mechanism of Large Language Model based Agentscited by 634
- 2023MemoryBank: Enhancing Large Language Models with Long-Term Memorycited by 556
- 2025Memory in the Age of AI Agentscited by 303
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 287
- 2025ACON: Optimizing Context Compression for Long-horizon LLM Agentscited by 136
- 2026MemRL: Self-Evolving Agents via Runtime Reinforcement Learning on Episodic Memorycited by 129
- 2025A Comprehensive Survey on Long Context Language Modelingcited by 117
9 more
- 2025Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Taskscited by 66
- 2026Memory for Autonomous LLM Agents:Mechanisms, Evaluation, and Emerging Frontierscited by 65
- 2026STALE: Can LLM Agents Know When Their Memories Are No Longer Valid?cited by 50
- 2026A Survey of Agent Memory in the Second Half: Towards Self-Evolving and Long-Horizon Agentscited by 44
- 2026Anatomy of Agentic Memory: Taxonomy and Empirical Analysis of Evaluation and System Limitationscited by 21
- 2026Mem-T: Densifying Rewards for Long-Horizon Memory Agentscited by 18
- 2026Learning Query-Aware Budget-Tier Routing for Runtime Agent Memorycited by 13
- 2025AdaGReS:Adaptive Greedy Context Selection via Redundancy-Aware Scoring for Token-Budgeted RAGcited by 8
- 2026Novel Memory Forgetting Techniques for Autonomous AI Agents: Balancing Relevance and Efficiencycited by 2
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Retain or Consolidate? Budget-Dependent Operator Selection for Language Agent Memorycited by 3
- 2026MindMemOS: A Portable and Self-Evolving Memory Operating Layer for AI Agentscited by 0
- 2026What Eviction Destroys: A Restore-Counterfactual Audit of Forgetting in Agent Memorycited by 0
- 2026When Should Agents Check External State? Budgeting Observations for Stored Intentionscited by 0
- 2026When Should Agents Check External State? Budgeting Observations for Stored Intentions29 Sep 2026
- 2026What Eviction Destroys: A Restore-Counterfactual Audit of Forgetting in Agent Memory8 Sep 2026
- 2026MindMemOS: A Portable and Self-Evolving Memory Operating Layer for AI Agents12 Aug 2026
- 2026Retain or Consolidate? Budget-Dependent Operator Selection for Language Agent Memory20 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2026Verifiable Memory: Learning Unified Memory Management with Local and Global Verifiers for Large Language Model Agents
- 2026Beyond Memory: Harnessing Long-Horizon Agents with Explicit Belief States
- 2026SAM: State-Adaptive Memory for Long-Horizon Reasoning Agent
- 2025Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement Learning
- 2026Learning What Not to Forget: Long-Horizon Agent Memory from a Few Kilobytes of Learning
- 2026DeferMem: Query-Time Evidence Distillation via Reinforcement Learning for Long-Term Agent Memory
- 2026Can Agents Forget When Asked? A Benchmark for Memory Unlearning in LLM Agents
- 2026Adaptive Memory Admission Control for LLM Agents