AFlow
Automating Agentic Workflow Generation
Monte Carlo Tree Search over code-represented workflows iteratively mutates and evaluates multi-agent pipelines.
The loop
- Proposes
An LLM mutates a selected workflow node by adding, removing, or rewiring prompt and tool operators in Python code.
- Judged by
A benchmark execution engine runs the modified workflow on the validation split and records empirical score and execution trace.
- Steers
MCTS backpropagates validation scores up the workflow tree and selects the next node by soft mixed-probability selection.
Headline result
Outperforms hand-crafted and automated workflow baselines by 5.7% average across six coding and math benchmarks while enabling smaller models to beat GPT-4o.
What this does not prove
Workflow search requires dozens of validation evaluations per benchmark, and overfits if the validation slice is too small.
How it generalizes the harness
- The algorithm is the solver
- Inverted control
- The output outlives the model
- Search over a population
- Recursive meta-evolution
MCTS controls the search over code graphs, calling the LLM as a mutation operator and keeping the top-scoring workflow program.
Classification
| What it proposes | Program |
|---|---|
| Generative model | Claude 3.5 Sonnet / GPT-4o mutation operator |
| Algorithmic authority | Monte Carlo Tree Search and benchmark execution evaluator |
| Feedback | Score |
| What gets updated | Search tree and prompt context |
| When it runs | Offline, at design time |
| Validity | Empirical (measured) |
| Evidence | Code released |
| Lineage | Derivative |