Skip to main content

Dynamic Plan

<Branch> chooses between execution paths at runtime. Here, an analyzer classifies task complexity and routes to either 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 is inside a Sequence, so it is not reached until analyze finishes and analysis is populated. <Sequence> runs children in order and waits for each to complete before starting the next, so the <Branch> only evaluates after analyze has persisted its output.
  • Resumable: completed task outputs are persisted, so re-running picks up where it left off.