Manuscript Offprint
arXiv:2610.26995SPEM: Structure-Aware Procedural Memory for Efficient Skill Use in LLM Agents
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
LLM-based agents increasingly rely on reusable skills. However, scaling skill libraries makes efficient and accurate skill use difficult. Full skill loading incurs high token and runtime overhead. In contrast, flat semantic retrieval treats skills as independent text entries, ignoring dependencies, execution order, state transitions, and data-flow constraints. We propose SPEM, a lightweight structure-aware procedural memory framework for efficient skill use in LLM-based agents. SPEM maintains Atomic Skill Memory for individual skills and Skill-DAG Memory for reusable compositions derived from successful executions. For a new task, SPEM reuses high-confidence Skill-DAG templates when available. Otherwise, it retrieves atomic skills and invokes Skill-GNN for state- and structure-aware skill selection. Successful executions are written back as new Skill-DAGs, allowing procedural memory to accumulate over time. Experiments on ALFWorld and SkillsBench show that SPEM achieves the best overall effectiveness–efficiency trade-off, reaching 87.1% ALFWorld success and 38.38% SkillsBench reward while reducing token and runtime costs against strong baselines.
Introduction
Large language model (LLM) agents are increasingly used as executable systems. They call tools, reuse skills, and interact with complex environments. In software engineering, data analysis, web automation, and embodied tasks, agents rely on reusable skills, such as file parsing, preprocessing, and API calling (Schick et al. 2023; Mialon et al. 2023; Yao et al. 2023). As skill libraries scale to hundreds or thousands of candidates, the central challenge changes. It shifts from whether useful skills exist to how an agent can retrieve, organize, and reuse the required skills efficiently (Patil et al. 2023; Qin et al. 2024; Shi et al. 2025).
Existing approaches face four limitations under large-scale skill libraries. First, loading all skill descriptions is infeasible due to high token cost, context bloat, and runtime overhead, with important details often lost in long contexts (Liu et al. 2024a). Second, flat retrieval optimizes semantic relevance but ignores structural dependencies like prerequisites, order, state transitions, and data flow across skills (Lewis et al. 2020; Karpukhin et al. 2020). Third, successful compositions are not stored as reusable procedural memory. Even when dependency-aware plans are built, they are discarded after execution. This forces agents to re-derive similar workflows (Yao et al. 2023; Shinn et al. 2023). Finally, as agent systems are deployed more frequently and model capabilities continue to improve, efficiency becomes a primary concern. Repeated model invocations for retrieval, planning, and reorganization incur unnecessary token consumption, latency, and computational overhead. These limitations call for a framework that can retrieve skills compactly, organize them structurally, and accumulate reusable procedural memory over time.
We therefore study efficient skill use under large-scale skill libraries. Our goal is to improve task success while reducing token cost, runtime overhead, and repeated skill organization. To this end, we propose SPEM, a lightweight structure-aware procedural memory framework. SPEM maintains two complementary memory layers. Atomic Skill Memory represents individual executable skills with their semantic, interface, and feedback signals. Skill-DAG Memory stores reusable skill compositions distilled from successful executions. Given a new task, SPEM first retrieves relevant procedural memory and reuses a high-confidence Skill-DAG template when available. Otherwise, or when the current guidance becomes insufficient, Skill-GNN constructs a task-conditioned candidate graph. It then performs state-aware skill selection over retrieved atomic skills. After execution, successful trajectories are compressed into Skill-DAGs and written back to memory for future reuse.
We evaluate SPEM on SkillsBench and ALFWorld (Li et al. 2026b; Shridhar et al. 2021). SkillsBench tests large-scale skill retrieval and technical task execution. ALFWorld evaluates long-horizon dependencies, structured skill use, and cross-task reuse in interactive environments. We compare SPEM with full skill loading, flat vector retrieval, and graph-based skill selection baselines.
Our contributions are fourfold:
• We propose SPEM, a dual-layer procedural memory framework that combines Atomic Skill Memory for fine-grained skill access with Skill-DAG Memory for reusable procedural structures.
• We design a Skill-GNN module for state-aware skill selection over task-conditioned candidate graphs.
• We introduce trajectory-DAG extraction to distill suc-
Corresponding author.
cessful executions into reusable Skill-DAG templates and update procedural memory through execution feedback.
• We evaluate SPEM on ALFWorld and SkillsBench, achieving 87.1% ALFWorld success and 38.38% SkillsBench reward while reducing token and runtime costs over strong structure-aware baselines.
From Structured Skills to Evolving Procedural Memory. As skills become reusable assets, recent work organizes them with explicit structures. SkillNet represents skills through a unified ontology and relation network. AgentSkillOS manages skills through classification, retrieval, capability trees, and dynamic skill management (Liang et al. 2026; Li et al. 2026a). Graph-based methods further model relations among tools or skills. ToolNet supports graph navigation over large tool collections; Graph of Skills retrieves dependency-aware skill bundles from a skill dependency graph; and GraSP constructs DAG-style skill structures with precondition and effect relations for long-horizon tasks (Liu et al. 2024b, 2026; Xia et al. 2026). These methods show that explicit structures help recover dependencies and execution relations. However, many of them use structure mainly for the current task or as a static organization layer. They give limited attention to how successful executions should be distilled, updated, and reused as evolving procedural memory. SPEM instead converts successful trajectories into reusable Skill-DAG templates and updates their reliability through execution feedback.
Lightweight Skill Retrieval and Selection. Large-scale skill use imposes constraints on context, latency, and computation. Recent work explores lightweight skill routing, representation, and reuse. SkillRouter uses compact models for recall-then-rerank selection over large skill sets. For-mal Skill replaces verbose Markdown descriptions with executable skill structures. CUA-Skill encapsulates GUI operation knowledge into reusable skills for dynamic retrieval and parameter instantiation (Zheng et al. 2026; Zhang et al. 2026; Chen et al. 2026). Other methods emphasize reusable experience. ProcMEM converts interaction experience into procedural memories. SkillDAG maintains typed relations among skills and evolves across episodes. Compositional Skill Routing retrieves skills for decomposed subtasks and composes them with a dependency-aware DAG planner (Mi et al. 2026; Bai et al. 2026; Gao 2026). These studies show that lightweight skill use is not merely reducing retrieved skills, but jointly concerns compact representation, efficient selection, execution constraints, and experience reuse. SPEM addresses this gap through a unified procedural memory framework that combines bounded atomic retrieval, reusable Skill-DAG Memory, and Skill-GNN organization.
Method
Given a task request and a large-scale skill library, SPEM provides compact, executable skill guidance through two memory layers: Atomic Skill Memory for individual skills and Skill-DAG Memory for reusable compositions distilled from successful executions. As shown in Figure 1, SPEM reuses a matched Skill-DAG template when available. Otherwise it retrieves atomic skills and invokes Skill-GNN for state-aware reranking when needed. Successful executions are written back as new Skill-DAGs. This enables procedural memory to accumulate over time. The full protocol is provided in Section A.1 of the supplementary material.
Dual-Layer Procedural Memory
SPEM separates procedural knowledge into two complementary memory layers. Atomic Skill Memory supports fine-grained access to individual skills, while Skill-DAG Memory supports direct reuse of successful skill compositions. The supplementary material provides the full schema and update rules in Section A.2.
Atomic Skill Memory. Atomic Skill Memory represents each skill as a reusable executable unit rather than an isolated text snippet. We denote it as
where each skill is represented as
Here, denotes skill metadata, denotes the semantic embedding. denotes lightweight execution feedback, such as usage frequency, success rate, and execution cost. This allows retrieval to consider both semantic relevance and historical execution evidence without loading the full skill library into the LLM context.
Skill-DAG Memory. Skill-DAG Memory stores reusable procedural templates extracted from successful executions. We denote it as

Figure 1: Overview of SPEM. The system retrieves atomic skills or matched Skill-DAG templates from dual-layer procedural memory, constructs a task-conditioned candidate skill graph, and uses Skill-GNN to produce compact guidance for the LLM executor. Successful trajectories are distilled back into reusable Skill-DAG memory.
where each Skill-DAG is represented as
Here, contains procedural nodes, contains directed dependency edges, is the task embedding associated with the template, and stores compact execution metadata. A Skill-DAG captures a reusable execution structure. It allows the agent to reuse previously successful procedures instead of reconstructing them from scratch.
Procedural Memory Retrieval. Given a task request q, SPEM first searches Skill-DAG Memory for reusable templates:
where is the task embedding and is the template matching threshold. If is non-empty, the highest-scoring Skill-DAG is injected as structured procedural guidance. If no template satisfies the threshold, SPEM retrieves a bounded set of atomic candidates:
The retrieved template or atomic candidates are then passed to the subsequent Skill-GNN orchestration stage when structure-aware organization is needed. This retrieval strategy avoids full-library loading while preserving two complementary modes of reuse: direct reuse of successful Skill-DAG templates and flexible organization of atomic skills for novel task states.
Structure-Aware Skill Selection with Skill-GNN
When reusable templates are unavailable or insufficient for the current execution context, SPEM uses Skill-GNN to perform structure-aware ranking and selection over retrieved atomic candidates. The goal is to identify semantically relevant skills. It also aims to select skills that are compatible with the task state and dependency relations among candidates.
Candidate Skill Graph Construction. Given a task request q, retrieved atomic candidates , and the current execution context, SPEM constructs a task-conditioned candidate graph
where contains task, context, and candidate skill nodes. contains typed edges, and R denotes relation types. Skill-node features combine semantic embeddings with lightweight execution feedback. Task and context nodes encode the request, current state, and execution history. Edges connect task–skill, context–skill, and skill–skill pairs, capturing relevance, state compatibility, semantic relatedness, and available dependency cues. Additional construction details are provided in Section A.5 of the supplementary material.
Skill-GNN Scoring. Given , Skill-GNN first performs node encoding and relation-aware reasoning through message passing, as summarized in Figure 1. Let be the initial representation of node . At layer , the node repre-

Figure 2: Overview of trajectory-DAG extraction. Successful trajectories are converted into execution graphs, from which necessary steps are identified through backward slicing, pruning, and dependency repair. The resulting backbones are stored as reusable Skill-DAG templates for future tasks.
sentation is updated by aggregating messages from relation-specific neighbors:
where denotes neighbors of node under relation type , is a relation-specific transformation. is the message weight, and is the layer update function.
After message-passing layers, Skill-GNN performs skill scoring. It assigns each candidate skill a context-dependent utility score:
The top-ranked skills, together with compact dependency cues when available, are injected as structured guidance for the LLM agent. This graph-based scoring incorporates task relevance, runtime state, and inter-skill dependencies into the skill selection process.
Cold-Start Deployment. SPEM supports both trajectory-rich and trajectory-scarce deployment settings. When target-domain trajectories are available, Skill-GNN is trained with trajectory-prefix supervision, where each prefix defines the current procedural state and the next executed skill is used as the target. When trajectories are scarce or unavailable, SPEM uses a library-level warm start constructed only from the skill library:
where is a pseudo query generated from the metadata of skill , and contains weak skill–skill relations induced by semantic similarity, shared tools, tags, or schema compatibility. This initialization uses no task outcomes, verifier rewards, or evaluation trajectories. During early deployment, Atomic Skill Memory retrieval and available Skill-DAG templates provide the primary guidance, while the warm-started Skill-GNN is used only for bounded reranking. As successful executions accumulate, trajectory-DAG extraction converts them into new Skill-DAG templates and trajectory-prefix training samples, gradually adapting the system from retrieval-only guidance to state-aware graph selection. Since Skill-GNN is inductive over dynamically constructed candidate graphs, it can generalize to unseen tasks, unseen skill combinations, and newly extracted Skill-DAG variants. Additional protocol and leakage-prevention details are provided in Section A.4 of the supplementary material.
Trajectory-DAG Extraction
As shown in Figure 2, SPEM converts successful interaction trajectories into reusable Skill-DAG templates after execution. Instead of storing complete trajectories, which may contain failed attempts, redundant exploration, or environment-specific details, the system extracts a compact execution backbone. This backbone preserves the necessary steps for reaching the success condition. Given an execution trajectory , the system first constructs an execution graph
where nodes represent executed steps and task-relevant states. Edges encode temporal order, entity dependencies, state transitions, and terminal reachability.
Starting from the successful terminal node , the system performs backward slicing to identify success-relevant nodes:
where indicates that v reaches the successful terminal state through temporal or dependency paths. Failed branches, redundant exploration, and operations that do not contribute to the final outcome are removed. The remaining nodes and their induced dependency edges are ordered and repaired according to temporal and dependency constraints, forming a compact Skill-DAG:
Finally, is written back to Skill-DAG Memory for future reuse. Successful non-template executions introduce new templates; successful template-guided executions reinforce or refine existing templates. Failed template executions only update reliability statistics. Detailed extraction rules, scoring signals, and update policies are provided in Section A.3 of the supplementary material.
Experiments
Experimental Setup
Benchmarks. We evaluate SPEM on two complementary skill-use benchmarks. ALFWorld (Shridhar et al. 2021) is an interactive text-based embodied environment. It requires multi-step household task completion, testing long-horizon dependencies, state transitions, and procedural reuse. SkillsBench (Li et al. 2026b) evaluates technical agent tasks with large skill libraries. It tests whether agents can retrieve and apply task-relevant skills under limited context budgets.
Metrics. For ALFWorld, we report Success, Steps, Tokens, and Runtime. Success ( ) is the task success rate within the maximum step budget. Steps ( ) is the average number of environment interactions. Tokens ( ) is the average token consumption during agent execution, and Runtime ( ) is the average agent-only execution time.
For SkillsBench, we report verifier reward , average input tokens , and agent-only runtime . Following the benchmark protocol, is determined by the official verifier. For fair accounting, measures the agent execution phase and excludes environment setup, dependency installation, Docker build time, and verifier runtime. For SPEM, online skill retrieval or reranking invoked during execution is included in the measured agent phase.
Baselines. We compare SPEM with four baselines that form a controlled progression in skill access and structure awareness. Vanilla Skills loads the full skill library, testing whether exhaustive context alone is sufficient. Vector Skills retrieves top-k skills by embedding similarity, isolating the effect of flat semantic retrieval. GoS serves as a representative static graph-retrieval method, using a prebuilt skill graph to retrieve structurally related skills. SkillDAG serves as a recent sota baseline for dependency-aware skill selection with a self-evolving graph structure. SPEM (Ours) further introduces dual-layer procedural memory, trajectory-DAG extraction, and on-demand Skill-GNN reranking. These baselines allow us to distinguish gains from more context, semantic retrieval, static graph structure, typed graph selection, and reusable procedural memory.
Implementation Details. For fair comparison, all methods use the same benchmark splits, skill libraries, agent interface, execution environment, and verification protocol. We evaluate with two backbone LLMs, MiniMax-M2.7 (MiniMax 2026) and GPT-5.2-Codex (OpenAI 2025), representing weaker and stronger model settings.
On ALFWorld, we use the dev split with 140 episodes and set the maximum number of environment steps to 30. All skill-based methods use the same library of 37 alfworld-* skills. SPEM builds Atomic Skill Memory from this library, constructs Skill-DAG Memory only from successful non-evaluation trajectories, and trains Skill-GNN with trajectory-prefix supervision under disjoint training and evaluation instances.
On SkillsBench, we follow the GoS execution setting with Docker-based environments, Harbor agent execution, verifier-based evaluation, at most two attempts per task, and two concurrent trials. Following the benchmark convention, tasks that remain unresolved due to infrastructure failures after the allowed retries are excluded rather than counted as model failures, leaving the same 67 valid model tasks for all methods. All methods use the same skills_200 skill library. SPEM builds Atomic Skill Memory from the same library and applies library-level warm start plus Skill-GNN reranking. Detailed hyperparameters, leakage-prevention rules, retry handling, and additional inference details are provided in Section B of the supplementary material.
Main Results
Overall effectiveness–efficiency trade-off. Table 1 shows that SPEM achieves the best overall trade-off across both benchmarks and backbone models. On ALFWorld, SPEM obtains the highest success rate under both MiniMax-M2.7 and GPT-5.2-Codex, improving over GoS by 2.1 and 1.8 percentage points, respectively, while also achieving the lowest runtime. On SkillsBench, SPEM achieves the best reward with GPT-5.2-Codex and the second-best reward with MiniMax-M2.7, where SkillDAG obtains a higher reward but requires substantially more tokens and runtime. In particular, compared with SkillDAG under MiniMax-M2.7, SPEM reduces input tokens by 26.3% and runtime by 24.3%, while remaining competitive in reward.
Efficiency becomes more important with stronger models. As the backbone model becomes stronger, structure-aware baselines such as GoS and SkillDAG also obtain competitive rewards, especially on SkillsBench. This makes efficiency a critical differentiator rather than a secondary metric. Under GPT-5.2-Codex, SPEM improves SkillsBench reward over GoS from 37.50% to 38.38%, while reducing input tokens by 15.7% and runtime by 12.3%. On ALFWorld, SkillDAG achieves fewer steps, but it incurs much higher token and runtime costs. In contrast, SPEM maintains the highest success rate with much lower execution overhead, suggesting that reusable procedural memory is most useful when it provides compact guidance rather than longer plans or larger context.
Why structure matters. The comparison among Vector Skills, GoS, SkillDAG, and SPEM clarifies the role of structure. Vector Skills often reduce context size but can lose im-
| Backbone | Method | SkillsBench | ALFWorld | |||||
|---|---|---|---|---|---|---|---|---|
| R ↑ | T ↓ | S ↓ | Success ↑ | Steps ↓ | Tokens ↓ | Runtime ↓ | ||
| MiniMax-M2.7 | Vanilla Skills | 21.61 | 798,323 | 469.3 | 59.3 | 21.24 | 152,242.1 | 55.95s |
| Vector Skills | 13.07 | 722,765 | 439.5 | 63.9 | 18.36 | 55,816.6 | 55.71s | |
| GoS | 23.50 | 735,113 | 399.4 | 68.6 | 20.26 | 62,033.9 | 54.22s | |
| SkillDAG | 27.09 | 979,781 | 476.1 | 63.3 | 16.37 | 296,512.4 | 137.38s | |
| Ours | 25.14 | 721,926 | 360.5 | 70.7 | 18.29 | 45,785.7 | 51.56s | |
| GPT-5.2-Codex | Vanilla Skills | 28.87 | 2,785,485 | 686.8 | 84.9 | 14.65 | 99,023.9 | 84.57s |
| Vector Skills | 23.44 | 1,047,698 | 763.4 | 83.7 | 16.18 | 47,357.3 | 80.43s | |
| GoS | 37.50 | 1,162,375 | 705.2 | 85.3 | 16.46 | 48,805.6 | 71.23s | |
| SkillDAG | 34.38 | 1,370,270 | 861.1 | 85.7 | 11.73 | 105,449.9 | 169.10s | |
| Ours | 38.38 | 980,029 | 618.7 | 87.1 | 15.07 | 47,409.1 | 66.01s | |
Table 1: Main results on SkillsBench and ALFWorld under different backbone models. For SkillsBench, R denotes the verifier reward, T denotes average input tokens, and S denotes agent-only runtime in seconds. For ALFWorld, Success denotes task success rate, while Steps, Tokens, and Runtime denote average environment steps, average token consumption, and agent-only runtime, respectively. ↑ indicates higher is better, and ↓ indicates lower is better. Bold numbers indicate the best result within each backbone group and benchmark, and underlined numbers indicate the second-best result.
| Backbone | Hit | Fallback | Ineffective | Hit Success |
|---|---|---|---|---|
| MiniMax-M2.7 | 56.43 | 43.57 | 25.32 | 74.68 |
| GPT-5.2-Codex | 60.71 | 39.29 | 14.12 | 85.88 |
Table 2: Template-availability analysis on ALFWorld. All values are percentages.
important procedural dependencies, leading to weaker reward or success. GoS and SkillDAG show that explicit skill structures improve task performance, but they mainly rely on static or pre-constructed structures and may introduce extra context or execution overhead. SPEM further combines Atomic Skill Memory, reusable Skill-DAG Memory, and state-aware Skill-GNN reranking, allowing the agent to reuse successful procedural structures while keeping injected guidance compact. These results indicate that the main advantage of SPEM is not simply retrieving more skills, but selecting and reusing structured procedural guidance under limited token and runtime budgets.
Detailed case analyzes of SPEM are provided in Section D of the supplementary material.
Analysis of DAG-Template Effectiveness
We analyze whether the extracted Skill-DAGs are both compact and useful. As shown in Figure 3(a), trajectory-DAG extraction compresses successful trajectories from 13.4 average steps to 6.0 backbone steps, pruning of operations while preserving the executable core. This preliminarily demonstrates the compression effect of DAG templates. We then evaluate the availability and effectiveness of DAG templates. As shown in Table 2, on ALFWorld, SPEM achieves template hit rates of and under MiniMax-M2.7 and GPT-5.2-Codex, respectively. Among template-hit tasks, the success rates are and , respectively. These results indicate that DAG templates can accumulate reusable procedural structures for later tasks. Unlike ALF-World, SkillsBench contains highly heterogeneous technical tasks, where exact procedural-template reuse is naturally limited. Therefore, we mainly use SkillsBench to evaluate large-scale atomic-skill retrieval and structure-aware reranking, and use ALFWorld to analyze Skill-DAG template reuse. Finally, we conduct an exact-template analysis on ALFWorld. This isolates the effect of a correct DAG skeleton itself. For each successfully completed task, we extract its trajectory and directly provide the DAG when re-executing that task. This setting tests whether DAG templates can improve execution efficiency. As shown in Figure 3(b), exact-DAG guidance preserves success on all evaluated tasks while reducing average steps from 11.42 to 6.26, token consumption from 23.77K to 11.93K, and runtime from 28.01s to 20.88s, corresponding to reductions of , , and , respectively. This suggests that templates provide effective procedural guidance for improving task efficiency.
| Method Variant | Succ. ↑ | Steps ↓ | Time ↓ | Tokens ↓ |
|---|---|---|---|---|
| w/o Skill-DAG | 56.8 | 23.0 | 55.4 | 67.5K |
| w/o Skill-GNN | 58.3 | 20.3 | 54.7 | 53.6K |
| w/o DAG Extraction | 63.0 | 18.9 | 57.8 | 56.2K |
| Full SPEM | 70.7 | 18.3 | 51.6 | 45.8K |
Table 3: Component ablation of SPEM on ALFWorld. Succ., Steps, Time, and Tokens denote task success rate, average completion steps, average runtime, and average token consumption. removes graph-based Skill-GNN and uses retrieved procedural memory.
Ablation Study.
SPEM Component Analysis Table 3 evaluates the contribution of each component of SPEM on ALFWorld.
Raw / baseline Pruned steps Retained / Skill-DAG Baseline Exact-DAG template
@1 @3 @5 @10 MRR GNN Retrieval-only
(a) Trajectory-DAG compression

(b) Exact-DAG template effect
(c) Hit@K scaling

(d) Recall@K and MRR
Skill library size
Skill library size
Figure 3: Effectiveness and scalability analysis. (a) Trajectory-DAG extraction compresses successful trajectories into compact DAG backbones. (b) Exact-DAG template reuse reduces normalized execution cost. (c) Hit@K under different skill library sizes. (d) Recall@K and MRR under different skill library sizes. Solid lines denote GNN-based reranking, while dashed lines denote retrieval-only selection.
• Skill-DAG templates provide reusable procedural guidance. Removing them reduces success to 56.8% and increases average steps to 23.0, indicating more redundant exploration.
• Skill-GNN supports state-aware skill selection: without graph-based scoring, success drops to 58.3%, showing that retrieved memory alone is not sufficient for stable execution under changing task states.
• DAG extraction makes procedural memory compact. Replacing extracted Skill-DAG backbones with complete execution traces lowers success to 63.0%. It also increases token and runtime cost, because full traces contain redundant exploration and environment-specific details.
• The full SPEM achieves the best results across all metrics. This demonstrates that reusable Skill-DAG templates, structure-aware skill selection, and compact trajectory extraction are complementary.
Scalability to Larger Skill Libraries. Figures 3(c) and (d) further examine whether structure-aware skill selection remains effective as the skill library grows. Retrieval-only selection degrades rapidly when the library size increases, especially at 1000 and 2000 skills, where semantic similarity alone struggles to rank the required skills near the top. In contrast, Skill-GNN consistently achieves higher Hit@K, Recall@K, and MRR across all library sizes. For example, at 2000 skills, Skill-GNN improves Hit@1 from 0.0 to 0.51 and MRR from 0.112 to 0.573 over retrieval-only selection. Although both methods become harder to rank as the candidate pool expands, the gap remains substantial, showing that graph-based contextualization helps preserve reliable skill selection under large-scale skill libraries.
Additional backbone comparisons and hyperparameter sensitivity analyses can be found in Section C of the supplementary material.
Conclusion
We presented SPEM, a reusable and structure-aware skill memory framework for LLM-based agents. Instead of treating skills as a flat prompt collection, SPEM organizes them into Atomic Skill Memory for individual capabilities and Skill-DAG Memory for reusable procedural structures. Skill-GNN further enables state-conditioned skill selection over dynamically constructed candidate graphs, allowing the agent to adapt its guidance during execution while remaining inductive to new tasks and skill combinations. Experiments on ALFWorld and SkillsBench show that SPEM improves both task effectiveness and execution efficiency across weaker and stronger backbone models. The results suggest that effective skill use requires more than semantic retrieval. Agents benefit from compact procedural guidance that captures both which skills are relevant and how they should be composed. Although current performance still depends on retrieval quality and the agent's ability to execute retrieved guidance, SPEM provides a practical step toward scalable, adaptive, and reusable skill memory for LLM-based agents.
References
Bai, T.; Wan, Z.; Zhou, P.; Yu, X.; You, Y.; and Tsang, I. W. 2026. SkillDAG: Self-Evolving Typed Skill Graphs for LLM Skill Selection at Scale. arXiv preprint arXiv:2606.03056.
Chen, T.; Li, Y.; Solodko, M.; Wang, S.; Jiang, N.; Cui, T.; Hao, J.; Ko, J.; Abdali, S.; Xu, L.; Zheng, S.; Fan, H.; Cameron, P.; Wagle, J.; and Koishida, K. 2026. CUA-Skill: Develop Skills for Computer Using Agent. arXiv preprint arXiv:2601.21123.
Chen, Y.; Yoon, J.; Sachan, D. S.; Wang, Q.; Cohen-Addad, V.; Bateni, M.; Lee, C.-Y.; and Pfister, T. 2024. Re-Invoke: Tool Invocation Rewriting for Zero-Shot Tool Retrieval. In Findings of the Association for Computational Linguistics: EMNLP 2024, 4705–4726.
Du, Y.; Wei, F.; and Zhang, H. 2024. AnyTool: Self-Reflective, Hierarchical Agents for Large-Scale API Calls. arXiv preprint arXiv:2402.04253.
Gao, X. 2026. Compositional Skill Routing for LLM Agents: Decompose, Retrieve, and Compose. arXiv preprint arXiv:2606.18051.
Han, T.; Zhang, Y.; Song, W.; Fang, C.; Chen, Z.; Sun, Y.; and Hu, L. 2026. SWE-Skills-Bench: Do Agent Skills Actually Help in Real-World Software Engineering? arXiv preprint arXiv:2603.15401.
Hao, S.; Liu, T.; Wang, Z.; and Hu, Z. 2023. ToolkenGPT: Augmenting Frozen Language Models with Massive Tools via Tool Embeddings. In Advances in Neural Information Processing Systems, volume 36, 45870–45894.
Karpukhin, V.; Oguz, B.; Min, S.; Lewis, P.; Wu, L.; Edunov, S.; Chen, D.; and Yih, W.-t. 2020. Dense Passage Retrieval for Open-Domain Question Answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, 6769–6781.
Lewis, P.; Perez, E.; Piktus, A.; Petroni, F.; Karpukhin, V.; Goyal, N.; Küttler, H.; Lewis, M.; Yih, W.-t.; Rocktäschel, T.; Riedel, S.; and Kiela, D. 2020. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. In Advances in Neural Information Processing Systems, volume 33, 9459–9474.
Li, H.; Mu, C.; Chen, J.; Ren, S.; Cui, Z.; Zhang, Y.; Bai, L.; and Hu, S. 2026a. Organizing, Orchestrating, and Benchmarking Agent Skills at Ecosystem Scale. arXiv preprint arXiv:2603.02176.
Li, M.; Zhao, Y.; Yu, B.; Song, F.; Li, H.; Yu, H.; Li, Z.; Huang, F.; and Li, Y. 2023. API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, 3102–3116.
Li, X.; Chen, W.; Liu, Y.; Zheng, S.; Chen, X.; He, Y.; Li, Y.; You, B.; Shen, H.; Sun, J.; et al. 2026b. SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks. arXiv preprint arXiv:2602.12670.
Liang, Y.; Zhong, R.; Xu, H.; Jiang, C.; Zhong, Y.; Fang, R.; Gu, J.-C.; Deng, S.; Yao, Y.; Wang, M.; et al. 2026. SkillNet: Create, Evaluate, and Connect AI Skills. arXiv preprint arXiv:2603.04448.
Liu, D.; Li, Z.; Du, H.; Wu, X.; Gui, S.; Kuang, Y.; and Sun, L. 2026. Graph-of-Skills: Dependency-Aware Structural Retrieval for Massive Agent Skills. arXiv preprint arXiv:2604.05333.
Liu, N. F.; Lin, K.; Hewitt, J.; Paranjape, A.; Bevilacqua, M.; Petroni, F.; and Liang, P. 2024a. Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics, 12: 157–173.
Liu, X.; Peng, Z.; Yi, X.; Xie, X.; Xiang, L.; Liu, Y.; and Xu, D. 2024b. ToolNet: Connecting Large Language Models with Massive Tools via Tool Graph. arXiv preprint arXiv:2403.00839.
Mi, Q.; Ma, Z.; Yang, M.; Li, H.; Wang, Y.; Zhang, H.; and Wang, J. 2026. ProcMEM: Learning Reusable Procedural Memory from Experience via Non-Parametric PPO for LLM Agents. arXiv preprint arXiv:2602.01869v1.
Mialon, G.; Dessì, R.; Lomeli, M.; Nalmpantis, C.; Pasunuru, R.; Raileanu, R.; Rozière, B.; Schick, T.; Dwivedi-Yu, J.; Celikyilmaz, A.; et al. 2023. Augmented Language Models: A Survey. Transactions on Machine Learning Research.
MiniMax. 2026. MiniMax M2.7: Enabling Model Self-Evolution. https://www.minimaxi.com/blog/minimax-m27. Accessed: 2026-07-25.
OpenAI. 2025. Introducing GPT-5.2-Codex. https://openai.com/index/introducing-gpt-5-2-codex/. Accessed: 2026-07-25.
Patel, B.; Belli, D.; Jalalirad, A.; Arnold, M.; Ermolov, A.; and Major, B. 2026. Dynamic Tool Dependency Retrieval for Lightweight Function Calling. In Findings of the Association for Computational Linguistics: ACL 2026, 33649–33672. San Diego, California, United States: Association for Computational Linguistics.
Patil, S. G.; Zhang, T.; Wang, X.; and Gonzalez, J. E. 2023. Gorilla: Large Language Model Connected with Massive APIs. arXiv preprint arXiv:2305.15334.
Qin, Y.; Liang, S.; Ye, Y.; Zhu, K.; Yan, L.; Lu, Y.; Lin, Y.; Cong, X.; Tang, X.; Qian, B.; Zhao, S.; Hong, L.; Tian, R.; Xie, R.; Zhou, J.; Gerstein, M.; Li, D.; Liu, Z.; and Sun, M. 2024. ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs. In International Conference on Learning Representations.
Schick, T.; Dwivedi-Yu, J.; Dessì, R.; Raileanu, R.; Lomeli, M.; Zettlemoyer, L.; Cancedda, N.; and Scialom, T. 2023. Toolformer: Language Models Can Teach Themselves to Use Tools. In Advances in Neural Information Processing Systems, volume 36.
Shi, Z.; Wang, Y.; Yan, L.; Ren, P.; Wang, S.; Yin, D.; and Ren, Z. 2025. Retrieval Models Aren’t Tool-Savvy: Benchmarking Tool Retrieval for Large Language Models. In Findings of the Association for Computational Linguistics: ACL 2025, 24497–24524. Vienna, Austria: Association for Computational Linguistics.
Shinn, N.; Cassano, F.; Gopinath, A.; Narasimhan, K.; and Yao, S. 2023. Reflexion: Language Agents with Verbal Reinforcement Learning. In Advances in Neural Information Processing Systems, volume 36.
Shridhar, M.; Yuan, X.; Côté, M.-A.; Bisk, Y.; Trischler, A.; and Hausknecht, M. 2021. ALFWorld: Aligning Text and Embodied Environments for Interactive Learning. In International Conference on Learning Representations.
Xia, T.; Hu, L.; Sun, Y.; Xu, M.; Xu, L.; Wang, S.; Xu, W.; and Jiang, J. 2026. GraSP: Graph-Structured Skill Compositions for LLM Agents. arXiv preprint arXiv:2604.17870.
Xu, Q.; Hong, F.; Li, B.; Hu, C.; Chen, Z.; and Zhang, J. 2023. On the Tool Manipulation Capability of Open-source Large Language Models. arXiv preprint arXiv:2305.16504.
Yao, S.; Zhao, J.; Yu, D.; Du, N.; Shafran, I.; Narasimhan, K.; and Cao, Y. 2023. ReAct: Synergizing Reasoning and Acting in Language Models. In International Conference on Learning Representations.
Yuan, L.; Chen, Y.; Wang, X.; Fung, Y. R.; Peng, H.; and Ji, H. 2023. CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsets. arXiv preprint arXiv:2309.17428.
Zhang, X.; Gao, M.; Zhao, Y.; Tan, X.; Yao, Y.; Wang, F.; Wang, Y.; Dingsiyi; and Yang, T. 2026. Formal Skill: Programmable Runtime Skills for Efficient and Accurate LLM Agents. arXiv preprint arXiv:2605.19604.
Zheng, Y.; Zhang, Z.; Ma, C.; Yu, Y.; Zhu, J.; Wu, Y.; Xu, T.; Dong, B.; Zhu, H.; Huang, R.; and Yu, G. 2026. SkillRouter: Skill Routing for LLM Agents at Scale. arXiv preprint arXiv:2603.22455.