Large language model agents can self-improve over time by utilizing procedural memory derived from prior task trajectories, yet the distinct utilities of memories derived from local successes and failures remain underexplored. This work studies this question in a realistic setting with heterogeneous streams of multi-domain tool-use tasks and various environment constraints common in real-world scenarios. We develop Dual-Polarity Memory with Periodic Maintenance (DualPM), a simple, retrieval-free memory workflow characterized by (1) customizable reflection and procedural memory generation from both local successes and failures within each trajectory, and (2) periodic memory consolidation over long task streams under a given memory capacity, preventing memory explosion. Online prequential evaluation with fine-grained metrics reveals that failure memory more strongly broadens coverage, success memory better streamlines execution, while combining both polarities effectively integrates both benefits. Further studies demonstrate that DualPM enables cross-domain memory generalization and continual memory adaptation, while external evaluation on EvoMemBench reveals the portability and effectiveness of DualPM as a general long-term procedural memory method.
Figures & tables
Figure 1: Blockwise task–reflection–maintenance workflow of DualPM.
User
Profile
Primary domains
Secondary domains
U1
Information worker
Email, News/Media
Finance, Education, Weather
U2
Student
Education, Email
Gaming, E-commerce, Music
U3
Budget-aware shopper
E-commerce, Finance
Travel, Weather, Education
U4
Entertainment lover
Gaming, Music
E-commerce, Travel, Finance
Table 1: User profiles and domain composition of the four task sequences. Primary domains constitute 70% of a user’s task sequence, while secondary domains constitute 30%.
Memory Setting
Recall
Efficiency
Answer Accuracy
Discovery
Selection
Usage
Usage Precision
Turns
No memory
75.2
68.0
66.0
50.5
6.1
68.1
Failure only
81.0
73.9
71.9
49.0
6.3
71.0
Success only
78.7
72.2
70.5
56.2
5.4
72.2
Both on
81.1
74.5
72.4
53.7
5.5
73.2
Table 2: Performance of memory polarities averaged across all four users. Recalls, usage precision, and final answer accuracy are reported in percentages. Bold and underline mark the best and second-best values, respectively.
Memory Setting
Recall
Efficiency
Answer Accuracy
Discovery
Selection
Usage
Usage Precision
Turns
No memory
79.0
71.9
69.6
49.1
6.2
72.0
Own memory
82.1
76.2
73.8
50.6
5.6
78.0
Transferred, frozen
79.3
73.7
71.5
48.2
6.4
75.0
Transferred, adaptive
82.1
75.3
73.5
50.0
5.6
78.5
Table 3: Cross-user memory transfer effects, averaged across U1 → U4 and U4 → U1. Recalls, usage precision, and final answer accuracy are reported in percentages. Bold and underline mark the best and second-best displayed values of memory-on settings, respectively; ties are marked equally.
Figure 2: Memory operations in user 4’s own memory and adapted user 1 memory.
Method
File System
Vehicle Control
Trading Bots
Travel Booking
Overall
No memory
64.0
36.0
54.0
26.0
45.0
General long-term memory
Mem0
76.0
58.0
48.0
30.0
53.0
A-MEM
68.0
62.0
70.0
26.0
56.5
MemOS
72.0
60.0
36.0
28.0
49.0
MemoryOS
72.0
72.0
56.0
36.0
59.0
Table 4: Success rate (%) on EvoMemBench-CrossEp-Tool. Best and second-best results are shown in bold and underlined , respectively. DualPM results are averaged from three independent runs; other results are taken from Table 6 of EvoMemBench. Overall is the average of all four domains.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Memory Setting
Tool Discovery
Weighted Token Usage (k)
Searches
Loaded Tools
Mean Best Rank
Task
DualPM
Total
No memory
2.4
19.3
7.7
70.4
0
70.4
Failure only
3.1
21.7
6.4
97.3
56.3
153.6
Success only
3.0
19.4
6.1
79.9
51.8
131.7
Both on
3.3
20.9
5.5
105.1
57.2
162.3
Appendix
Table 5: Supplemental diagnostic metrics in the memory polarity experiment. Numbers are per-episode averages across 4 users.
Memory Setting
Recall
Efficiency
Answer Accuracy
Discovery
Selection
Usage
Usage Precision
Turns
No memory
66.6
59.9
57.9
50.7
5.6
56.7
Discovery only
80.3
71.9
69.6
51.3
5.8
64.4
Unrestricted
82.8
75.2
73.1
55.3
5.6
69.4
Appendix
Table 6: Effects of memory scopes on user 2 task performance. Recalls, usage precision, and final answer accuracy are reported in percentages.
Large Language Models (LLMs) show promise as tool-using agents but remain limited in long-horizon tasks that require remembering, organizing, and reusing knowledge. Prior memory approaches aim to resolve the situation, but mainly focus on storing factual information. Recent work on procedural memory improves task reuse, yet often reduces to replaying past successes without addressing failure cases or online scalability. We introduce a unified and automatic memory framework that integrates semantic, episodic, and procedural memory in a bi-level design combining short-term and long-term stores. A multi-agent architecture with actor, memory, and critic agents enables automatic memory generation, reward annotation, and adaptive retrieval. Long-term memory is managed through reward-based evaluation, merging, and pruning, ensuring scalability and continual improvement. Experiments across various environments show that our approach improves robustness and success on long multi-turn tasks compared to existing baselines. This work highlights the importance of comprehensive, adaptive memory for advancing LLM-based agents.
Modern large language model (LLM) agents can use external tools to help users solve complex tasks. However, for problems that require learning from long-term historical events or from previous agent-environment interactions, LLM agents are required to use memory mechanisms to store and retrieve experiences. While sophisticated memory systems exist for dialogue agents, few studies have empirically examined how to improve agents' tool-using capabilities through past user-agent conversations. We propose MemToolAgent, a framework that improves tool use through memory management. Our approach contains a memory extraction module that processes past experiences into structured memory entries, and a retrieval module that dynamically selects a subset of the stored memory entries. This enables more personalized and accurate responses aligned with user preferences and feedback without requiring LLM fine-tuning. In summary, this work has three main contributions: (1) a unified memory entry format that improves both general-purpose and personalized tool use without LLM fine-tuning, (2) a reflection-based memory extraction that uses environment and user feedback to distill wrong executions into critiques to store, and (3) a retrieval module that chooses how many past experiences to use based on the memory similarity distribution. MemToolAgent achieves 29%, 80%, and 17% relative improvements compared to strong baselines on the WorkBench, NESTFUL, and PEToolBench benchmarks, respectively.
Suleyman Armagan Er, Danilo Ribeiro, Yogesh Virkar +5
Learning from past experience benefits from two complementary forms of memory: episodic traces -- raw trajectories of what happened -- and consolidated abstractions distilled across many episodes into reusable, schema-like lessons. Recent agentic-memory systems pursue the consolidated form: an LLM rewrites past trajectories into a textual memory bank that it continuously updates with new interactions, promising self-improving agents without parameter updates. Yet we find that such consolidated memories produced by today's LLMs are often faulty even when derived from useful experiences. As consolidation proceeds, memory utility first rises, then degrades, and can fall below the no-memory baseline. More surprisingly, even when consolidating from ground-truth solutions, GPT-5.4 fails on 54% of a set of ARC-AGI problems it had previously solved without memory. We trace the regression to the consolidation step rather than the underlying experience: the same trajectories yield qualitatively different memories under different update schedules, and an episodic-only control that simply retains those trajectories remains competitive with the consolidators we test. In a controlled ARC-AGI Stream environment that exposes Retain, Delete, and Consolidate actions, agents preserve raw episodes by default and double the accuracy of their forced-consolidation counterparts; disabling consolidation entirely (episodic management only) matches this auto regime. Practically, robust agent memory should treat raw episodes as first-class evidence and gate consolidation explicitly rather than firing it after every interaction. Looking forward, reliable agentic memory will require LLMs that can consolidate without overwriting the evidence they depend on.
Dylan Zhang, Yanshan Lin, Zhengkun Wu +4
University of Illinois Urbana-Champaign · IIIS, Tsinghua University