Skip to main content

Multi-Agent Review

Two reviewers run concurrently via <Parallel>, then an aggregator produces a final verdict.

Workflow Definition

Running

How Parallel Works

  • All children of <Parallel> start at the same time.
  • maxConcurrency limits simultaneous tasks. If omitted, all run at once.
  • The Sequence waits for all parallel tasks to finish before continuing.
  • Tasks sharing the same output table are disambiguated by nodeId.
Retrieve each result with ctx.outputMaybe(schemaKey, { nodeId }):
Both return undefined until their respective tasks complete. When a downstream task just needs to consume those results as its prompt, as aggregate does above, prefer <Task deps={{ secReview: outputs.review, qualReview: outputs.review }} needs={{ secReview: "security-review", qualReview: "quality-review" }}> with a (deps) => ... children callback instead: it defers the task until both rows exist and hands you resolved, non-optional values.