Manuscript Offprint

arXiv:2610.39508

Compile Away Uncertainty: Self-Evolving Agent Skills via Programmatic Compilation

Chengyu Yang, Yunxiang Zheng, Zongzheng Li, Jiamei Li, Boxun Lan, Xiaoyu Liu, Xiaoyu Zhang, Xiaohong Chen, Ming Hu

Chengyu Yang¹, Yunxiang Zheng¹, Zongzheng Li¹, Jiamei Li¹, Boxun Lan¹, Xiaoyu Liu², Xiaoyu Zhang¹, Xiaohong Chen¹, Ming Hu¹,*

¹East China Normal University, ²China University of Geoscience

*Corresponding author

Abstract—Self-evolving agent skills enable AI agents to accumulate and refine reusable procedural knowledge from interaction experience without updating model parameters. However, since such skills are typically represented as textual documents and executed through LLM reasoning, even previously learned procedures must be repeatedly interpreted and regenerated, introducing avoidable uncertainty into every execution. In contrast, program execution is deterministic and independently verifiable. Intuitively, transforming well-specified operations into executable programs can reduce reliance on LLM reasoning and, consequently, reduce execution uncertainty. Motivated by this intuition, we introduce SKILLCOMPILER, a self-evolving skill framework that integrates programmatic compilation into the skill evolution process. Specifically, SKILLCOMPILER adopts an executability-aware skill compilation strategy that decomposes skills into fine-grained operations, analyzes their executability, and constructs hybrid skill skeletons that retain LLM reasoning for context-dependent operations while compiling well-specified ones into validated programs. To avoid redundant program synthesis and enable executable knowledge to accumulate across evolving skills, we further design a program asset reuse mechanism that organizes validated programs as reusable assets, retrieves existing implementations whenever applicable, and synthesizes and verifies new programs only when necessary. Extensive experiments on five benchmarks and six model families demonstrate that SkillCompiler consistently outperforms state-of-the-art methods, achieving up to 32.33% improvement in task performance.

Index Terms—self-evolving agents, reusable skills, programmatic compilation, execution reliability, tool use

I. INTRODUCTION

Large language model (LLM) agents have demonstrated strong capabilities in reasoning, planning, tool use, and environment interaction, enabling them to solve increasingly complex tasks, including information retrieval, Web interaction, and interactive problem solving [1–5]. However, agents often need to rediscover similar task-solving procedures when facing new tasks, even when related experience has already been acquired. Agent skills provide a natural way to preserve such experience as reusable procedural knowledge, allowing agents to reuse previously acquired task-solving procedures without updating the underlying language model [6–10]. Consequently, effectively accumulating and reusing skills has become an important direction for improving agent capabilities through interaction experience.

To continuously accumulate and refine reusable skills from interaction experience, existing work has explored different strategies for skill evolution. Existing approaches can be broadly

classified into two categories, i.e., skill content evolution and skill execution augmentation. Specifically, skill content evolution improves reusable procedural knowledge through trajectory distillation [9], reflection-based revision [12], and validation-guided skill optimization [10]. Skill execution augmentation enhances how acquired skills are applied by reusing learned workflows [16, 17], incorporating external tool capabilities [5], or constructing executable procedural representations [19–21]. These methods enable agents to progressively improve both the knowledge encoded in skills and the way such knowledge is reused during task execution.

Although existing skill evolution methods can continuously accumulate and refine reusable task-solving knowledge, they still face two challenges in reliable and efficient skill reuse, i.e., execution uncertainty and repeated capability construction. Specifically, ① executing an evolved skill still requires the agent to repeatedly interpret retained knowledge, reconstruct intermediate decisions, and generate corresponding actions through LLM reasoning. As a result, even with an unchanged skill, repeated executions may follow different reasoning paths and produce different outcomes. ② Reusable execution capabilities discovered during skill evolution are often constructed for individual skills or tasks and are not persistently organized for subsequent reuse, leading to repeated generation and validation of similar procedures across evolving skills. Therefore, how to reduce execution uncertainty while efficiently accumulating and reusing executable knowledge across skill evolution remains an important problem.

Typically, LLM reasoning is inherently probabilistic, which makes the execution of the same skill susceptible to different intermediate decisions and outcomes across repeated runs. In contrast, executable programs encode their inputs, control flow, and state transformations explicitly, so the same operation follows a fixed execution procedure under the same conditions rather than regenerating intermediate decisions at each invocation. Intuitively, when an operation has explicit inputs, well-defined execution logic, and checkable outputs, its execution no longer needs to be repeatedly regenerated through LLM reasoning. Instead, such operations can be realized as executable programs, while LLM reasoning is retained for context-dependent or difficult-to-formalize decisions. Moreover, once these programs are validated, they can be persistently accumulated and reused across evolving skills, avoiding repeated synthesis of the same executable procedures.

Inspired by the above intuition, we propose SKILLCOMPILER, a self-evolving skill framework that transforms suitable reasoning operations into deterministic executable programs as skills evolve. Specifically, ① SKILLCOMPILER adopts an executability-aware skill compilation strategy to identify which skill operations can be reliably transformed into executable programs while retaining LLM reasoning for context-dependent decisions. ② To avoid redundant program synthesis and enable executable knowledge to accumulate across evolving skills, SKILLCOMPILER integrates a program asset reuse mechanism that organizes validated programs as reusable assets, retrieves compatible implementations whenever available, and synthesizes and verifies new programs only when necessary. In this way, SKILLCOMPILER reduces unnecessary LLM reasoning while preserving the flexibility required for unresolved operations. The main contributions are summarized as follows.

• We propose SKILLCOMPILER, a self-evolving skill framework that progressively transforms suitable skill operations into deterministic executable programs. Its executability-aware compilation strategy identifies which operations can be reliably programmatized while retaining LLM reasoning for context-dependent decisions.

• We design a program asset reuse mechanism that persistently accumulates, retrieves, and reuses validated executable programs across evolving skills, reducing redundant program synthesis and enabling executable knowledge to continuously grow through interaction.

• We conduct extensive experiments on five benchmarks and six model families. The results show that SKILLCOMPILER outperforms state-of-the-art methods, achieving up to 32.33% improvement in task performance.

References (21)