Planning & Control Flow

LLMCompiler

Take ReWOO's plan-as-DAG and run independent steps in parallel through a task-fetching dispatcher.

Problem

A sequential executor walks the plan one tool call at a time, so end-to-end latency is the sum of every call even when the calls have no mutual dependency. Naive parallel-tool-calling (firing them all at once from a single chat turn) ignores the dependency graph and breaks when later calls reference earlier results. A bespoke parallel runner without bounded concurrency and a join step blows past provider rate limits, leaks errors across branches, and assembles results out of order. The team needs a runner that respects the dependency graph while overlapping independent work.

Solution

Three roles. Planner builds the dependency DAG. Task-Fetching Unit dispatches steps as their inputs become available, with bounded concurrency. Joiner assembles the final answer from the resolved DAG.

When to use

  • Latency-sensitive agents waste time waiting on independent tool calls in series.
  • A planner can build a dependency DAG up front for the workload.
  • Bounded concurrency and a join step are acceptable engineering investments.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related