Most Large Language Model (LLM) agent memory systems rely on a small set of static, hand-designed operations for extracting memory. These fixed procedures hard-code human priors about what to store and how to revise memory, making them rigid under diverse interaction patterns and inefficient on long histories. To this end, we present MemSkill, which reframes these operations as learnable and evolvable memory skills, structured and reusable routines for extracting, consolidating, and pruning information from interaction traces. Inspired by the design philosophy of agent skills, MemSkill employs a controller that learns to select a small set of relevant skills, paired with an LLM-based executor that produces skill-guided memories. Beyond learning skill selection, MemSkill introduces a designer that periodically reviews hard cases where selected skills yield incorrect or incomplete memories, and evolves the skill set by proposing refinements and new skills. Together, MemSkill forms a closed-loop procedure that improves both the skill-selection policy and the skill set itself. Experiments on LoCoMo, LongMemEval, HotpotQA, and ALFWorld demonstrate that MemSkill improves task performance over strong baselines and generalizes well across settings. Further analyses shed light on how skills evolve, offering insights toward more adaptive, self-evolving memory management for LLM agents. Code is available at https://github.com/ViktorAxelsen/MemSkill
Figures & tables
Figure 1: Comparison between (a) prior turn-level, handcrafted operations and (b) MemSkill’s span-level, skill-conditioned generation. Prior methods interleave handcrafted operations with LLM calls to incrementally extract and revise memory turn by turn, while MemSkill selects a small set of skills from a shared skill bank and applies them in one pass to produce skill-guided memories.
Figure 2: MemSkill architecture overview. Given an interaction trace, MemSkill processes it span by span: the controller selects a Top- K subset of skills from a shared skill bank conditioned on the current text span and retrieved memories, and an LLM executor applies the selected skills in one pass to update the trace-specific memory bank . The constructed memory is then evaluated on memory-dependent training queries to provide task reward for optimizing the controller, while query-centric failures are logged into a sliding hard-case buffer. Periodically, the designer mines representative hard cases to refine existing skills and propose new ones, yielding alternating phases of skill usage and skill evolution. More skill case study can be found in Section 4.5 and Appendix C .
Model
Methods
Conversational Benchmarks
Embodied Interactive Tasks
LoCoMo
▲ LongMemEval
Avg.
ALF-Seen †
ALF-Unseen †
Avg.
F1
L-J
F1
L-J
L-J
SR
#Stps ↓
SR
#Stps ↓
SR
LLaMA3.3 70B-Instruct
No-Memory
-
-
-
-
-
62.14
26.10
73.88
21.36
68.01
CoN
30.86
41.72
30.78
56.44
49.08
75.00
19.15
80.60
17.38
77.80
ReadAgent
28.63
38.25
24.48
42.62
40.44
62.86
26.14
71.64
22.88
67.25
MemoryBank
36.80
44.43
30.56
41.96
43.20
60.71
28.23
66.42
24.64
63.57
Table 1: Main comparison results on LoCoMo, LongMemEval, and ALFWorld.
Figure 3: Skill generalization under distribution shift on HotpotQA. We transfer the LoCoMo-trained skill bank to HotpotQA and evaluate three context-length settings (50/100/200 concatenated documents) following ( Yu et al., 2025 ) . Bars show LLM-judge (L-J) under LLaMA with different Top- K skill counts, compared to MemoryOS and A-MEM.
Variant
LLaMA
Qwen
MemSkill
53.82
54.14
w/o Ctrl
48.43
42.84
w/o Des
46.50
36.15
Ref.-only
47.45
48.88
Table 2: LoCoMo ablation (L-J).
Figure 4: Case study. We show representative evolved skills learned on LoCoMo and ALFWorld.
Setting
L-J
In (K)
Out (K)
Calls
MemoryOS
48.64
1013
165
1288
A-MEM
49.71
2850
362
1548
LightMem
51.95
789
209
685
Ours (SS=128)
53.14
622
57
376
Ours (SS=256)
51.61
390
19
270
Ours (SS=512)
53.82
249
18
215
Table 3: Cost analysis on LoCoMo.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Model
Methods
Embodied Interactive Tasks
ALF-Seen †
ALF-Unseen †
Avg.
SR
#Stps ↓
SR
#Stps ↓
SR
LLaMA
LightMem
74.29
21.69
75.37
20.69
74.83
AWM
66.43
23.25
68.66
22.25
67.55
Expel
67.14
23.26
66.42
22.40
66.78
MemSkill
77.14
18.91
83.58
16.63
80.36
Appendix
Table 4: More comparison results on ALFWorld.
Model
Methods
Embodied Interactive Tasks
ALF-Seen
ALF-Unseen
Avg.
SR
#Stps ↓
SR
#Stps ↓
SR
LLaMA3.3 70B-Instruct
No-Memory
17.14
43.74
20.15
42.99
18.65
CoN
40.71
33.44
30.60
37.66
35.66
ReadAgent
32.86
37.09
38.06
34.78
35.46
MemoryBank
25.00
39.96
32.84
36.54
28.92
Appendix
Table 5: More comparison results on ALFWorld without in-context demonstrations.
Model
Methods
Interactive Tool-Use Benchmark
Test-N
Test-C
Avg.
Test-N †
Test-C †
Avg.
PR
#Steps ↓
PR
#Steps ↓
PR
PR
#Steps ↓
PR
#Steps ↓
PR
LLaMA3.3 70B-Instruct
No-Memory
22.80
36.71
19.10
37.92
20.95
54.03
14.21
38.78
19.12
46.41
ReadAgent
23.43
34.82
20.49
31.36
21.96
53.76
14.54
38.67
19.24
46.22
MemoryBank
23.28
35.66
19.96
33.34
21.62
53.66
14.89
38.46
18.84
46.06
A-MEM
22.13
38.46
17.60
38.46
19.87
52.85
14.31
38.16
18.78
45.51
Appendix
Table 6: More comparison results on AppWorld with and without in-context demonstrations.
Model
Methods
Conversational Benchmarks
LoCoMo
▲ LongMemEval
Avg.
F1
L-J
F1
L-J
L-J
LLaMA3.1 8B-Instruct
ReadAgent
17.53
21.49
9.45
18.80
20.15
MemoryBank
18.84
22.36
13.27
24.59
23.48
A-MEM
19.95
25.62
16.12
25.71
25.67
Mem0
14.26
17.12
14.59
26.38
21.75
Appendix
Table 7: Experimental results on LoCoMo and LongMemEval using Llama-3.1-8B-Instruct.
Method
F1
L-J
Frozen Similarity
40.97
50.80
LLM Selector
39.16
48.73
MemSkill
44.21
53.82
Appendix
Table 8: Comparison of skill selection strategies on LoCoMo using LLaMA.
Method
F1
L-J
Gradient-Free Self-Correction
36.35
46.34
Static Well-Engineered Skills
35.28
44.90
MemSkill
44.21
53.82
Appendix
Table 9: Comparison with simplified alternatives on LoCoMo using LLaMA.
While Large Language Model (LLM) agents increasingly rely on long-term memory for persistent interactions, the retrieval mechanisms governing this memory are rarely treated as evolvable components. This static approach limits performance on heterogeneous memory queries, which often demand diverse evidence construction strategies. To address this, we introduce ERSkill, a retrieval-centric framework for evolving, skill-guided memory access. ERSkill compiles interaction histories into a structured memory store and represents retrieval behaviors as executable skills composed of fundamental primitives. At inference time, a trained router dynamically matches each query to a suitable retrieval skill to construct tailored evidence for answer generation. ERSkill co-evolves the skill set and the router during training. It employs an experience trie to efficiently record explored retrieval paths, alongside a double-frontier mechanism that separates oracle-side capability expansion from router-validated deployment. Experiments across multiple agent memory benchmarks demonstrate that ERSkill substantially outperforms strong non-evolving and evolving baselines. Notably, it improves the overall average across F1, BLEU-1, and LLM-judge scores by 31.3% with Qwen3-Next-80B-A3B-Instruct and by 21.4% with GPT-5.4-nano.
Haolong Chen, Liang Zhang, Zhuo Li +2
Shenzhen International Center for Industrial and Applied Mathematics · Shenzhen Research Institute of Big Data · The Chinese University of Hong Kong, Shenzhen +2
As agentic tasks grow in complexity, LLM agents increasingly rely on experiential memory to reuse procedural knowledge across tasks. Effective memory design must jointly address what to store, how memory is structured and retrieved, and how memory evolves. Existing systems tackle each only partially: they store trajectories, insights, or workflows as isolated entries, discarding compositional relationships among subtasks and reusable skills; retrieve by flat embedding similarity that ignores relational signals; and maintain memory without leveraging its relational structure. We propose HyperSkill, a hypergraph-based memory framework that jointly improves all three. HyperSkill represents memory as a hypergraph with two node types, subtask steps and reusable skills, where each hyperedge links the subtasks and skills from a single trajectory. Dual-path retrieval queries both subtask and trajectory levels, ranking skills by co-occurrence across retrieved trajectories. Periodic structure-informed maintenance prunes low-utility nodes and merges redundant skills via quality-weighted propagation. Across xBench, GAIA, and WebWalkerQA with GPT-4o and Qwen3-30B-A3B, HyperSkill outperforms ten memory baselines, yielding gains of up to +11.51 on GAIA and +11.18 on WebWalkerQA.
Ruiyao Xu, Tiankai Yang, Wei-Chieh Huang
Northwestern University · University of Southern California · University of Illinois at Chicago
Memory expertise is a learned skill: knowing what to encode, when to retrieve, and how to organize knowledge--a capacity known in cognitive science as metamemory. We bring this perspective to LLMs by treating memory management as a trainable skill. We promote file-system operations to first-class memory actions alongside task actions, letting the model itself decide how to manage its memory. This memory skill improves along two axes: the structure that supports it (prompts, file schemas, action vocabulary), and the proficiency of the model exercising it. Both axes resist manual optimization: episodes in long-horizon tasks run for thousands of steps, and a single memory mistake can hide long before it surfaces, making human review of full trajectories impractical. We introduce AutoMem, a framework that automates both axes. In the first loop, a strong LLM reviews complete agent trajectories and iteratively revises the memory structure that shapes how the agent interacts with its memory files. In the second loop, the agent's own good memory decisions are identified from many episodes and used as training signal to sharpen the model's memory proficiency directly. Across three procedurally generated long-horizon games (Crafter, MiniHack, and NetHack), optimizing memory alone--without modifying the model's task-action behavior--improved the base agent's performance ~2x-4x, bringing a 32B open-weight model competitive with frontier systems such as Claude Opus 4.5 and Gemini 3.1 Pro Thinking. Our results show that memory management is an independently learnable skill, and a high-leverage objective yielding large gains on long-horizon tasks.