Skip to main content

Dynamic Plan

<Branch> chooses between execution paths at runtime: here, an analyzer classifies task complexity and routes to a quick fix or a multi-step plan.

Workflow Definition

Running

High complexity path:
Low complexity path (planner skipped):

How Branch Works

  • if is evaluated each time the workflow re-renders. Only the matching branch (then or else) is mounted.
  • The Branch sits inside a Sequence, which runs children in order and waits for each to complete before starting the next, so <Branch> only evaluates after analyze finishes and its output is persisted.
  • Resumable: completed task outputs are persisted, so re-running picks up where it left off.