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 HuarXiv 2026 · arXiv

TL;DR

SKILLCOMPILER is a self-evolving framework that makes LLM agents more reliable by "compiling" well-defined task operations into deterministic programs. By combining these validated code snippets with LLM reasoning for context-heavy decisions, the system significantly reduces execution uncertainty and builds a persistent library of reusable procedural knowledge.

What Problem Does This Paper Address?

Large Language Model (LLM) agents are increasingly capable of solving complex tasks using "skills"—reusable procedural knowledge. However, most current agents represent these skills as natural language documents. This forces the agent to repeatedly interpret and re-reason through the same steps every time a skill is invoked.

Because LLM reasoning is inherently probabilistic, this leads to execution uncertainty: the same agent, given the same task and the same skill, might take different paths or produce different outcomes across multiple runs. Furthermore, agents often "reinvent the wheel," synthesizing similar procedures for different tasks rather than accumulating a library of validated, executable assets.

Methods

The authors introduce SKILLCOMPILER, which treats skill evolution as a programmatic compilation process. The framework operates in three main phases:

  1. Executability-Aware Skill Compilation: The system decomposes a task into fine-grained operations. It then analyzes each operation to see if it is "programmable"—meaning it has explicit inputs/outputs, clear logic, and checkable effects. These are compiled into programs, while context-dependent or ambiguous operations remain under LLM control, forming a hybrid skill skeleton.
  2. Program Asset Reuse: To avoid the overhead of constantly writing new code, SKILLCOMPILER maintains a Program Asset Bank. Before synthesizing a new program, it searches for compatible, previously validated implementations.
  3. Skill Optimization: The agent executes the hybrid skill. If it fails, a Skill Optimizer performs "local revision." Instead of scrapping the whole plan, it identifies the specific problematic operation, fixes it (or its code), and updates the skeleton.
Fig. 1. Framework and Overview of SKILLCOMPILER

Datasets

The framework was evaluated across five diverse benchmarks to test different agent capabilities:

  • SearchQA: Open-domain question answering.
  • OfficeQA & DocVQA: Document understanding and grounded reasoning.
  • LiveMath: Complex mathematical reasoning.
  • ALFWorld: Long-horizon interactive tasks in a simulated environment.

The researchers tested these benchmarks against six different model families, including Gemini-3.8-Flash, DeepSeek-V4.1-Flash, and Qwen3.8-Flash.

Key Insights and Ideas

  • Deterministic vs. Probabilistic: The core "aha" moment is that not all parts of a task require "thinking." By offloading well-defined logic (like data processing or specific tool calls) to code, you eliminate the "dice roll" of LLM generation for those steps.
  • Hybrid Skeletons: Rather than trying to compile an entire complex task into one giant script (which is brittle), SKILLCOMPILER keeps the LLM "in the loop" for high-level, context-sensitive decisions while using code for the "grunt work."
  • Local vs. Global Revision: When a skill fails, SKILLCOMPILER doesn't just ask the LLM to "try again." It uses an operation contract (defining inputs, outputs, and preconditions) to pinpoint exactly which step failed, allowing for surgical fixes to the procedural knowledge.
  • Amortized Synthesis: Program synthesis is expensive, but by treating programs as persistent assets, the cost of generating a piece of code is amortized over every future task that reuses it.

Key Results

SKILLCOMPILER consistently outperformed state-of-the-art baselines (like SkillOpt and Voyager) across all models and benchmarks.

  • Performance Boost: It achieved up to a 32.33% improvement in task performance (specifically on LiveMath using GLM-5.3-Flash).
  • Reliability: The framework drastically reduced the Execution Instability Rate (EIR). On the ALFWorld benchmark, SKILLCOMPILER reduced EIR to just 3.0%, compared to 7.5% for the next best baseline.
  • Efficiency: On LiveMath, it reduced model calls per task to 0.450 (down from ~1.0 for most baselines), as many steps were handled entirely by compiled code without needing an LLM request.
Fig. 2. Execution reliability comparison on ALFWorld using DeepSeek-V4.1-Flash.

Limitations and Future Work

  • Operation Boundaries: The system relies on being able to clearly identify where one operation ends and another begins. In highly fluid or "fuzzy" tasks, these boundaries might be hard to define.
  • Validation Scope: Programs are validated against specific environment states. There is no formal guarantee that a program validated in one scenario will generalize perfectly to all unseen conditions.
  • Contextual Residue: Decisions that remain under LLM control still carry probabilistic uncertainty. The framework reduces uncertainty but cannot eliminate it entirely for tasks requiring high-level semantic judgment.
  • Future Directions: The authors suggest exploring SKILLCOMPILER in more dynamic, open-ended web environments where tool interfaces and task requirements change rapidly.

Summary updated

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.
BibTeX
@misc{yang2026compile,
  author = {Chengyu Yang and Yunxiang Zheng and Zongzheng Li and Jiamei Li and Boxun Lan and Xiaoyu Liu and Xiaoyu Zhang and Xiaohong Chen and Ming Hu},
  title = {{Compile Away Uncertainty: Self-Evolving Agent Skills via Programmatic Compilation}},
  year = {2026},
  eprint = {2610.39508},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.39508},
}
Figure