AFlow

Automating Agentic Workflow Generation

Monte Carlo Tree Search over code-represented workflows iteratively mutates and evaluates multi-agent pipelines.

Read the paper

The loop

  1. Proposes

    An LLM mutates a selected workflow node by adding, removing, or rewiring prompt and tool operators in Python code.

  2. Judged by

    A benchmark execution engine runs the modified workflow on the validation split and records empirical score and execution trace.

  3. 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

MCTS controls the search over code graphs, calling the LLM as a mutation operator and keeping the top-scoring workflow program.

Classification

Classification of AFlow (Automating Agentic Workflow Generation)
What it proposesProgram
Generative modelClaude 3.5 Sonnet / GPT-4o mutation operator
Algorithmic authorityMonte Carlo Tree Search and benchmark execution evaluator
FeedbackScore
What gets updatedSearch tree and prompt context
When it runsOffline, at design time
ValidityEmpirical (measured)
EvidenceCode released
LineageDerivative