Back to AI Research

AI Research

ReTrace turns repeatable AI agent procedures into workflows

Key Takeaways

  • ReTrace turns logged agent decisions into reusable workflows, measuring completion, time and cost on 79 production procedures and public benchmarks.
  • ReTrace builds reusable workflows from written procedures and logged agent runs.
  • In 79 production procedures, the authors report a 24% lower cost per task and a lower completion rate.
  • A language model agent can choose each step of a business process every time it runs.
  • ReTrace tests a different approach to business process automation: learn the decision rules from a few runs, then have a workflow choose the steps in code.

A language model agent can choose each step of a business process every time it runs. ReTrace tests a different approach to business process automation: learn the decision rules from a few runs, then have a workflow choose the steps in code. The preprint was submitted to arXiv on November 10, 2026.

How does ReTrace turn an agent run into a rule?

ReTrace starts with a written standard operating procedure and a few logged agent runs. The authors use the explanation associated with a tool call to recover why the agent took that action, then merge conditions across runs into a rule document. They compile that document into an executable workflow for the target platform. The compiled code chooses the next step at run time. A tool within a step can still call a model.

What did the comparison find?

Across 79 procedures on the authors' production platform, ReTrace completed 93.8%, compared with 96.8% for the agent, and cost 24% less per task. On the tau-squared benchmark, the workflow reached 75.8% task success against the agent's 80.6%, while the reported time per task fell from 170 seconds to 1.3 seconds. Repair on labeled training failures improved results in a separate comparison. That repair is additional work before the workflow is reused.

When is a fixed workflow worth evaluating?

The results are most relevant to procedures that repeat often enough to justify building and validating a workflow. The authors also found that removing the recorded explanations reduced performance in two of their settings, suggesting that a tool-call log by itself can miss useful decision context.
A team using the paper as a starting point should measure completion as well as cost per task. It should also check whether the initial examples and later repairs cover the branches that matter in its own procedure. The paper's results do not establish that unfamiliar branches will work.

Comments