arXiv:2610.26453cs.AIOct 2026

Manuscript Offprint

arXiv:2610.26453

Remembering Has a Price: Learning Memory Worth under Resource Constraints

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 Introduction

Lifelong agents continually accumulate, retain, and reuse experience from an evolving task stream, enabling continued adaptation after deployment [35]. This capability is particularly valuable for long-running interactive agents that must adapt to changing users, environments, and tasks [4, 6, 16]. In practice, however, lifelong adaptation rarely operates with unlimited resources. Generation is constrained by latency, computation, or inference cost; interaction opportunities are finite; and only a bounded amount of historical experience can be stored or supplied to the agent at each decision step [8, 11, 29]. This raises a fundamental question: do existing lifelong-memory mechanisms remain effective when generation, interaction, and memory resources are jointly constrained?

Our evaluation reveals that they often do not. As shown in Figure 1(a), under stringent joint resource constraints, several sophisticated lifelong-memory approaches provide limited improvement over simple retrieval or even no-memory agents, and can substantially underperform in some environments. These results highlight the need to evaluate lifelong agents for their effectiveness under a specified joint resource budget, where generation, interaction, and memory resources are severely limited. Importantly, this failure cannot be attributed simply to insufficient memory capacity: under the

40th Conference on Neural Information Processing Systems (NeurIPS 2026) Workshop: Towards Test-Time Continual Learning Agents (TTCL).

Figure

Figure

Figure 1: Left: Representative local results with Qwen2.5-14B-Instruct under the evaluated stringent joint resource constraints; TokenWorth remains effective where several memory baselines do not. Right: Resource-constrained lifelong agents operate under bounded generation, interaction, and memory budgets.

same resource budget, different memory policies can lead to markedly different downstream task performance.

To study this problem systematically, we formalize resource-constrained lifelong agents: lifelong agents that must continually improve from experience while operating under bounded generation, interaction, and memory budgets. As illustrated in Figure 1(b), we jointly constrain the resources available for both task execution and experience reuse. Specifically, the agent operates with a bounded output budget and a limited number of interaction rounds, while its external memory is constrained in capacity, the number of retrieved experiences, and the amount of memory that can be injected at each step. These inference-time constraints leave backbone capacity unchanged, allowing us to study lifelong adaptation under a controlled, stringent resource budget.

Why do existing memory mechanisms become fragile under such constraints? When only a small amount of past experience can be retained or supplied to the agent, and opportunities for reasoning and recovery are limited, each memory decision becomes more consequential. In particular, semantic relevance alone may be insufficient for allocating scarce memory resources: an experience can appear relevant to the current query yet provide little downstream utility. Conversely, a useful experience that is not retained or selected cannot be recovered by simply injecting more context or extending the interaction. Resource scarcity therefore turns memory allocation into a more stringent value-estimation problem. The central challenge is no longer merely to retrieve the most relevant past experience, but to determine which experiences are actually worth retaining and reusing when memory and execution resources are limited.

To address this challenge, we propose TokenWorth, a lightweight online memory framework that learns query-dependent memory worth from sparse execution feedback. TokenWorth combines an interpretable online base scorer with a residual Recursive Feature Machine (RFM), allowing stable global patterns of memory usefulness to be complemented by nonlinear, query-specific corrections. The learned worth is used to guide both memory retrieval and bounded memory-bank management, allocating limited memory resources toward experiences that are most useful for future tasks.

We conduct our main evaluation on three LifelongAgentBench environments covering database interaction, operating-system tasks, and knowledge-graph reasoning, under both local and API-based deployments. Across all six environment–deployment combinations, TokenWorth achieves the highest task success rate among the evaluated methods while also using the fewest output tokens. These results show that its gains do not rely on longer generations; instead, selecting higher-value experience allows the frozen backbone to use a limited generation budget more effectively.

Our contributions are threefold:

• We formulate resource-constrained lifelong agents and study effectiveness under stringent joint constraints on generation, interaction, and memory.

• We propose TokenWorth, which learns query-dependent memory worth from online execution feedback and uses it consistently for memory retrieval and bounded memory management.

• We evaluate TokenWorth across three LifelongAgentBench environments under both local and API-based deployments, demonstrating improved task success and generation efficiency under stringent resource constraints.

References (35)