Compiling Mixed Agent Traces into Guarded Executable Workflows
Abstract
LLM agents often solve repeated tasks by reconstructing similar tool-use proce- dures with different inputs. Although storing reusable local functions can reduce low-level execution effort, the model still needs to reason about how to compose these functions for every new request. We propose Trace2Workflow, a framework that converts successful interaction traces into reusable executable workflows. In- stead of repeatedly planning from scratch, the agent can directly reuse a learned workflow when its applicability conditions are satisfied. This reduces the reason- ing burden of the model and avoids unnecessary LLM calls. When no workflow is applicable, the agent falls back to normal model-based reasoning, which pre- serves robustness on unseen tasks. We evaluate Trace2Workflow on ALFWorld and AppWorld under a continual setting. We compile previously successful task- level compositions, rather than only local skills, into guarded executable work- flows whose bindings and observable effects are checked at runtime. These re- sults show that reusable workflows can amortize repeated composition reasoning across tasks, reducing both model inference burden and execution cost without sacrificing task performance.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.