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.