Compiling Agent Traces into Typed Workflows for Cheaper and Faster Execution of Recurring Tasks
Jorge Garcia-Carrasco, Javier Sanchis, Sandra Garcia-Ponsoda, Alejandro Mate, Juan Trujillo
Abstract
LLM agents solve a wide range of digital tasks, and benchmarks now report high success on requests that span several applications and many steps. However, much of that work is repetitive: a user asks for the same kind of change again and again, such as moving an alarm or rescheduling a meeting, with different data but a familiar procedure. Running the full agent for every instance is therefore expensive. To this aim, we propose an intermediate representation for such workflows: a directed graph whose nodes fall into three categories by output space, EXECUTE for computation and tool calls, DECIDE for one bounded choice over candidates the graph declares, and GENERATE for the open-ended rest. The idea is that a compiler agent takes the successful traces and compiles them into such a representation. An engine then runs the graph, calling a model only where a node declares one, so a deployment keeps neither the agent loop nor its context. We evaluate on AppWorld, compiling from one agent's traces and running the result on held-out instances. We show that the compiled workflows solved all instances at 98 times lower cost and 76 times faster per run. Compiling a workflow took three to five minutes and paid for itself after 31 to 50 executions.
Create a lesson
Metadata
- Categories
- cs.AI, cs.SE
- Comments
- 37 pages, 8 figures, 6 tables. Submitted to Knowledge-Based Systems
Related papers
ZETA: Towards Real-time AGI in the Frontier AAA Game with Zeroth Embodied Task Agent
Shared title terminologycs.AIJiahao Lu, Shicheng Fang, Jiajun Chen et al.
PSE: Analyzing Long-Horizon LLM Agents by Decomposing Tool Use into Planning, Selection, and Execution
Shared title terminologycs.AILang Cao, Hanbing Liu
EvoLink-Bench: A Benchmark for Evaluating Self-Evolving Agents in Long-Horizon Interdependent Task Streams
Shared title terminologycs.AIWei Chen, Xiaodong Lu, Weihao Shen et al.
Crucible: Evaluating LLM Agents in Executable Chemistry Research Environments
Shared title terminologycs.AIYinjun Liu, Xinye Li, Ruisen Peng et al.
Evolving Pixel-Based Game Agent: Generalizable Strategy Learning from Open-World Exploration
Shared title terminologycs.AIXinyu Liu, Chenwei Tang, Zizhou Wang et al.
G-Skill: Graph-Grounded Skill Evolution for Agentic Reinforcement Learning
Shared title terminologycs.AIJue Hou, Chengyi Yang, Renxu Bao et al.