Large language model (LLM) agents increasingly operate over long Web interaction histories, making memory management critical for reliable and efficient decision making. Existing methods primarily optimize storage, retrieval, or compression, but the memories most semantically relevant to the current state are not necessarily those that most improve the agent's action. We introduce MemCredit, a decision-centric memory framework that shifts memory selection from semantic relevance to decision utility. MemCredit estimates the state-, reference-context-, and policy-conditional marginal contribution of individual memories through controlled counterfactual interventions, and distills these intervention-derived credits into a lightweight utility estimator. At inference time, semantic relevance is used only for high-recall candidate generation, while predicted utility arbitrates which memories are retained under a fixed token budget, without modifying the underlying agent policy or requiring additional environment interaction. We evaluate MemCredit on ALFWorld and WebShop against representative memory baselines. On ALFWorld, MemCredit achieves 86.57 SR@50 under a 500-token historical-memory budget, compared with 65.67% for BM25 retrieval. Counterfactual analysis further shows that memory utility is sparse, strongly state dependent, and poorly captured by semantic relevance. These results suggest that decision utility provides a more effective principle than relevance alone for long-horizon agent memory management.
Figures & tables
Figure 1. Motivation of MemCredit. Semantic relevance does not necessarily imply decision utility. A memory that appears less related to the current observation may be critical for avoiding an incorrect action, whereas a highly relevant memory can be redundant.
Figure 2. Performance–memory Pareto comparison on WebShop. MemCredit achieves the highest task score while using only 152.1 memory tokens per decision, about 2.8× fewer than MemArbiter and approximately 3.9× fewer than retrieval-based alternatives. The desirable region is the upper left: higher task performance with lower memory cost.
Figure 3. Overview of MemCredit. Interaction histories are organized into atomic memories, whose policy-conditional decision utility is estimated through controlled counterfactual interventions and distilled into a lightweight utility estimator. At inference time, semantic relevance provides high-recall candidates, while predicted utility arbitrates memory selection under a fixed token budget for the unchanged agent policy.
Memory Budget
Method
Task-wise SR@50 (%)
Overall ↑
Recovery ↑
Failed Rep. ↓
Pick (24)
Look (18)
Clean (31)
Heat (23)
Cool (21)
Pick Two (17)
500
Flat Recency
70.83
61.11
58.06
52.17
57.14
41.18
57.46
40.8
43.2
BM25
87.50
83.33
74.19
47.83
57.14
35.29
65.67
46.3
38.5
Dense Retrieval
87.50
83.33
77.42
60.87
66.67
47.06
71.64
53.7
32.1
Failure-Aware
83.33
88.89
74.19
56.52
66.67
47.06
70.15
59.6
27.6
State-Aware Retrieval
91.67
88.89
80.65
65.22
71.43
52.94
76.12
63.4
24.5
Table 1. Performance on 134 unseen ALFWorld tasks under two historical-memory budgets. We report SR@50 (%) overall and across six task categories, with category sizes shown in parentheses. Recovery and failed-action repetition characterize post-failure behavior.
Method
Score ↑
Mem. Tokens ↓
Repeat Search ↓
Invalid Act. ↓
Steps ↓
History-based
Full / Truncated History
0.356
599.1
0.278
0.353
12.9
Flat Recency
0.328
490.3
0.292
0.357
13.0
Relevance-based Retrieval
BM25
0.407
597.0
0.260
0.352
12.8
Dense Retrieval
0.451
596.8
0.252
0.346
12.7
Table 2. Overall performance on WebShop. Score denotes the official WebShop task score, and memory tokens are averaged over decision steps. Lower memory usage, repeated-search rate, invalid-action rate, and trajectory length are better.
Figure 4. Cross-model generalization on ALFWorld. Cross-model comparison under a fixed 500-token memory budget for (a) SR@15 and (b) SR@50. Only the action-generation model is changed; all other agent components and evaluation settings remain fixed.
Quantity
Estimate [95% CI]
Relevance–utility alignment
Combined Spearman ρ
−0.011[−0.073,+0.077]
Dense-only Spearman ρ
−0.191
Broad-only Spearman ρ
+0.135[+0.062,+0.209]
Utility concentration
Mean memory credit
+0.054[+0.030,+0.080]
Table 3. Summary of counterfactual memory-utility analysis. Confidence intervals are obtained by task-clustered bootstrap.
Figure 5. Counterfactual analysis of memory decision utility. (a) Relevance–utility association changes across task coverage and is near zero on the combined set. (b) Mean memory credit varies substantially across decision states, with the strongest effect after failures. (c) Decision utility is highly sparse: most interventions produce no measurable change. Error bars denote task-clustered 95% bootstrap confidence intervals.
Feature Set
Spearman ↑
AUPRC ↑
AUROC ↑
Relevance-only
−0.031
0.097
0.483
Content-only
+0.016
0.122
0.493
Failure-only
+0.095
0.184
0.658
Full
+0.220
0.270
0.744
Shuffled labels
+0.048
0.146
–
Table 4. Task-disjoint prediction of intervention-derived decision utility using 5-fold GroupKFold by task ID. The shuffled-label model serves as a negative control for spurious fitting.
Variant
SR@50 (%) ↑
Scoring strategy
Relevance-only (BM25)
65.67 ( −18.66 )
Failure-only heuristic
70.15 ( −14.18 )
Relevance + utility ( λ=0.5 )
78.36 ( −5.97 )
Utility-only (full features)
84.33 ( + 0.00)
Utility features
Table 5. Ablation of MemCredit on ALFWorld under a 500-token memory budget. Δ is measured relative to utility-only ranking with full features.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Δ SR (pp)
Recovery (%)
Failed Rep. (%)
Flat Recency
−8.21
40.8
43.2
Dense Retrieval
+5.97
53.7
32.1
Failure-Aware Retrieval
+4.48
59.6
27.6
State-Aware Retrieval
+10.45
63.4
24.5
MemArbiter
+17.17
68.2
22.4
MemCredit (hybrid)
+12.69
69.7
20.6
Appendix
Table 6. ALFWorld budget-500 comparison relative to BM25 (65.67% SR@50). All 134 tasks have valid paired records. Recovery denotes the post-failure recovery rate and Failed Rep. the failed-action repetition rate; both are taken from the main comparison.
Quantity
Estimate [95% CI]
Mean memory credit
+0.054 [ +0.030 , +0.080 ]
Spearman (relevance, utility), combined
−0.011 [ −0.073 , +0.077 ]
Spearman, dense-only (11 tasks)
−0.191
Spearman, broad-only (44 tasks)
+0.135 [ +0.062 , +0.209 ]
Q1–Q5 relevance-quintile utility gap
−0.009 [ −0.072 , +0.069 ]
Utility zero-share
0.869
Appendix
Table 7. Decision-utility causal statistics (combined set). “Decision utility” is the credit of including one memory item relative to the reference context; positive means inclusion improves the decision, and the reported statistics use the single-removal reference context S=Ct∖{mi} .
State type
Mean credit [95% CI]
Zero share
failure_context
+0.176 [ +0.077 , +0.257 ]
0.722
normal_progress
+0.060 [ +0.007 , +0.120 ]
0.863
repeat_risk
+0.035 [ −0.019 , +0.080 ]
0.923
constraint_sensitive
+0.033 [ −0.010 , +0.079 ]
0.900
reference_sensitive
+0.023 [ −0.023 , +0.076 ]
0.853
subgoal_transition
−0.005 [ −0.036 , +0.031 ]
0.962
Appendix
Table 8. Mean memory credit by state type (combined set).
Figure 6. ALFWorld performance across baseline failure density. Tasks are partitioned into terciles using failure density measured from frozen BM25 trajectories, and the same partition is used for both methods. MemCredit consistently improves over BM25 across all three groups. Error bars denote task-bootstrap 95% confidence intervals; annotations report paired SR@50 differences and their 95% confidence intervals.
Large language model (LLM) agents must retain and use cross-step information to act coherently in long-horizon tasks. Existing methods improve memory accessibility, yet action-relevant information may still fail to guide the current decision because it is poorly formed, organized, prioritized, or presented. We call this post-access failure the Memory-Action Gap. We propose MemArbiter, a function-aware memory arbitration framework that addresses the memory-management-induced component of this gap. MemArbiter decomposes interaction histories into atomic items, organizes them into five functional Memory Banks, and combines bank-level demand, item-level relevance, focal-ambient representations, and a temporal presentation gate to dynamically control memory salience. We evaluate MemArbiter on ALFWorld against Flat Retrieval and Flat Recency under unified per-step memory budgets. With an open-weight action-generation model, MemArbiter achieves success rates of 82.8% and 92.5% under 500- and 750-token budgets, outperforming the strongest baseline by 20.9 and 25.4 percentage points, respectively. It also improves post-failure recovery and reduces failed-action repetition and state-action recurrence. These results show that function-aware memory arbitration enables accessible information to guide actions more effectively.
Jiajun Dong, Yutao Hu, Fengrui Fan +3
Huazhong University of Science and Technology, China · Fudan University, China
Large language model (LLM) agents have demonstrated the ability to solve multi-step tasks requiring planning, tool use, and external information access, yet growing execution histories increase inference cost and expose reasoning to outdated, irrelevant, or misleading information, potentially degrading reasoning quality. Existing memory approaches organize or compress execution histories but provide limited mechanisms for deciding which memories remain active. We introduce the, a hierarchical memory system that organizes execution into tasks, subtasks, and actions while assigning each memory a dynamic retention score. Event-based updates and selection-based decay revise these scores, allowing WMT to preserve useful information, fold completed trajectories, suppress low-utility content, and retain access to folded context. We evaluate WMT on GAIA-Text using Qwen3-8B, Gemma 4 E4B, and Llama-3.1-8B, with ablations and memory-poisoning experiments. Relative to linear memory, WMT improves accuracy by an average of 9.97 percentage points while reducing prompt-token usage by 32.8%. Memory-poisoning experiments show that WMT limits the persistence and propagation of unreliable information. Our results suggest that effective long-horizon agent memory depends less on storing more information than on deciding which information should remain active.
Quang Dao, Purvi Kathalkar, Kenneth Eaton
Rose-Hulman Institute of Technology · Georgia Institute of Technology · Georgia Tech Research Institute
Large language model (LLM) agents that serve users across many sessions must choose, for every request, the few stored memories that enter a limited context window. This choice largely decides whether the agent answers correctly, and it runs on every request at Web scale. This selection faces three challenges: a large and growing store, a per-request cost budget, and multi-session questions that need all of their evidence. Many memory systems build notes or graphs with hundreds to thousands of LLM calls per history, and each is designed on its own, so it is unclear which component yields the accuracy. These challenges mirror the properties of recommendation, so we formalize agent memory as budgeted slate recommendation, with the request as the user, stored memories as items and the context window as a slate. The formalization places memory systems in one design space of recommender cascades and factorizes accuracy into the completeness that each stage controls. Guided by it, we propose AgentMemRec, which adapts candidate generation, learning to rank and slate construction from recommender systems and selects memories without any LLM call. On multi-session questions of LongMemEval, AgentMemRec outperforms memory and context-selection methods, including A-Mem, HippoRAG 2, DynamicRAG and T-Mem, by 10 to 31 points of accuracy. It matches an LLM reranker that makes 64 calls per query at 3.2 times lower serving cost, and on LoCoMo it outperforms Mem0 and Zep without any LLM call at write time. The factorization attributes the gains to slates that more often hold all of the evidence, so recommender-system design offers an effective and efficient foundation for the long-term memory of LLM agents.