Hexis organizes agent skills into clear step-by-step machines
HEXIS: Compiling Skills into Extended Finite State Machines
Artificial Intelligence
Summary
Making software agents follow complex tasks is hard because they often mix deciding what to do with how to do it, causing mistakes. The authors propose HEXIS, which turns skills into a machine that separates knowledge from control steps, helping agents know exactly what to do next. This makes tasks run more correctly and efficiently, as shown in tests where HEXIS performed better than older methods and used fewer computing steps.
What this means in practice
- •For software automation teams: Implement automated workflows that clearly separate knowledge instructions from control steps for more reliable task execution.
- •For robotic system developers: Design robots to use compiled skill machines to reduce errors when performing sequential tasks.
Authors
Minghao LI
Abstract
Agent skills provide reusable knowledge and instructions, yet agents must repeatedly infer how to apply them and which operation should follow. This couples task reasoning with control decisions, allowing prescribed steps to be omitted or applied incorrectly. We introduce HEXIS, which compiles agent skills into extended finite state machines that separate knowledge from control flow. Skill knowledge is incorporated into local instructions that guide reasoning and generation within states. The machine records execution progress and intermediate results, while explicit transition conditions determine subsequent operations. Our incremental compiler first maps skill clauses and tool interfaces to state operations, local instructions, data bindings, and transitions. It then aligns development traces with existing states to identify missing operations and dependencies. These are incorporated by adding or reusing states and refining their connections. Updates are accepted only after static checks and replay of the current and all previously accepted traces. Across four benchmarks and four executors, HEXIS improves success over Skill + ReAct by 16.1 percentage points on average. Qwen3.8-27B reduces execution tokens by 38.4-88.9% across benchmarks.