← Latest papers
💻 computer science

TraceCompiler: Skill-Guided Mining and Compilation of LLM Agent Traces into Mostly Deterministic Workflows

This paper introduces TraceCompiler, a skill-guided system that mines noisy LLM agent traces to compile them into mostly deterministic, executable workflows by rigorously inferring inter-tool dependencies through auditable evidence, thereby significantly reducing runtime API calls while maintaining high precision in dependency recovery.

Original authors: Salma El Yadouni (EPFL), Guanyi Li (Binome Technologies)

Published 2026-08-05
📖 5 min read🧠 Deep dive

Original authors: Salma El Yadouni (EPFL), Guanyi Li (Binome Technologies)

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are teaching a very smart, but slightly scatterbrained, robot butler how to make your favorite sandwich. You show it the process once: it grabs the bread, then the cheese, then the knife, then the knife again because it forgot, then the cheese again to check the label, and finally the bread. It gets the sandwich, but the path it took was a messy zigzag of retries, double-checks, and wandering around the kitchen. Now, imagine you ask the robot to make that same sandwich a hundred times. If you just let it "learn" by doing it every time, it will keep paying the price of that messy zigzag every single time, wasting energy and time rediscovering steps it already knows. This is exactly what happens with modern AI agents that use tools (like checking a calendar or sending a message). They are brilliant at figuring things out on the fly, but they often re-invent the wheel, re-reading instructions and retrying failed attempts for every single new request. The big question in this corner of computer science is: Can we take those messy, repetitive "diaries" of what the AI did, clean them up, and turn them into a strict, efficient recipe that the AI can follow without needing to think as hard every time? This is the difference between a robot that has to figure out how to walk every morning versus one that has a pre-programmed muscle memory for walking.

Enter TraceCompiler, a new system designed to be the "chef" that turns those messy robot diaries into clean, executable recipes. The researchers behind this work realized that while AI agents are great at exploring, they are terrible at remembering their own efficient paths. TraceCompiler acts like a detective and an editor combined. It looks at hundreds of noisy attempts to do the same task (like asking for money on Venmo or adding a song to a playlist) and tries to figure out which steps were actually necessary and which were just the AI stumbling around.

The core magic of TraceCompiler is a strict rule about "cause and effect." In a messy log, two actions might happen one after the other just by coincidence, like the robot grabbing the bread and then the cheese. TraceCompiler refuses to assume the bread caused the cheese to be grabbed. Instead, it demands proof: "Did the cheese actually need a specific piece of information that only the bread-grabbing step produced?" If the answer is no, the link is cut. If the answer is yes, and no other step could have provided that info, the link is kept. This allows the system to strip away the "noise"—the retries, the accidental lookups, and the redundant checks—and leave behind a streamlined workflow.

The results are impressive but come with important caveats. When tested on a dataset of travel-related tasks, the system's automated rule correctly identified the necessary connections between steps with about 93% precision and 94% recall. This is a huge jump compared to simpler methods that just look at what happens next in line (which only got about 71% right) or methods that just count how often steps appear together. In a specific test involving a Venmo money-request task, the system managed to shrink a messy process that required 34 API calls down to just 11 essential calls. That's a massive reduction in work!

However, the paper is very careful not to claim this is a perfect, magic solution. The system isn't just a "black box" that works every time; it's a cautious editor. For instance, when trying to compile a workflow for adding songs to a playlist, the system hit a wall. It realized that the AI's logs didn't clearly show whether the songs were being added or removed, and since these are opposite, irreversible actions, the system refused to compile a recipe. It chose to stop and say, "I can't be sure, so I won't guess," rather than risking a mistake that could delete a user's music. This "refusal to compile" is actually a feature, not a bug, proving the system prioritizes safety over speed.

Furthermore, the researchers admit that while the compiled workflows are efficient, they didn't measure how much time or money it took to create those workflows in the first place. It's like saying, "This new car gets great gas mileage," without telling you how much it cost to build the engine. They also found that while the system works well on synthetic data (computer-generated examples), it relies heavily on the AI's ability to spot patterns, and it can't yet handle every possible type of messy log perfectly.

In the end, TraceCompiler shows that we can turn the chaotic, repetitive behavior of AI agents into clean, deterministic programs, but only if we are willing to be strict about what counts as "proof." It's a step toward AI that doesn't just "figure it out" every time, but actually learns to follow a reliable, efficient path—provided we can prove that path is safe and necessary.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →