cs.AIOct 19, 2026

Remembering Has a Price: Learning Memory Worth under Resource Constraints

Authors: Guannan Lai, Zi-Yang Bai, Jun-Peng Jiang, Han-Jia Ye

Organizations: School of Artificial Intelligence, Nanjing University · National Key Laboratory for Novel Software Technology, Nanjing University

Abstract

Lifelong agents continually accumulate and reuse experience to improve after deployment, yet in practice they often operate under tight generation, interaction, and memory budgets. Under such stringent joint constraints, we find that existing lifelong-memory methods can become ineffective, with several sophisticated approaches offering little advantage over simple retrieval or even no-memory agents. This reveals a more fundamental problem: resource scarcity makes each memory decision more consequential. When only a small amount of past experience can be retained or reused and opportunities for reasoning and recovery are limited, retrieving a relevant but ineffective memory can consume scarce context and hinder downstream execution. The key challenge is therefore not simply to retrieve relevant experience, but to determine which experiences are actually worth retaining and reusing. To address this challenge, we propose TokenWorth, a lightweight online memory framework that learns query-dependent memory worth from sparse execution feedback and applies it consistently to memory retrieval and bounded memory management. Across three LifelongAgentBench environments and both local and API-based deployments, TokenWorth achieves the highest task success rate while using the fewest output tokens among the evaluated methods. These results suggest that effective lifelong adaptation under resource constraints depends not on remembering more, but on learning what is worth remembering. Our code is publicly available at https://github.com/AIGNLAI/TokenWorth.

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. LIMBO: Lifelong Inference-Time Memory and Budget Optimization for LLM Agents

    Sep 12, 2026Siddharth Sharma, Nilesh Prasad Pandey, Onat Gungor +1Inference-Time Compute AllocationMemory-Augmented Language Model Agents

  2. MemPrice: Online Memory Allocation via Adaptive Pricing for Long-Horizon Agents

    Oct 18, 2026Yiming Zong, Shiyuan Piao, Jiashuo Jiang +1Memory Management for LLM AgentsLLM Context Management