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 tasks complete. For a downstream task that just consumes the results as its prompt, like aggregate above, prefer <Task deps={{ secReview: outputs.review, qualReview: outputs.review }} needs={{ secReview: "security-review", qualReview: "quality-review" }}> with a (deps) => ... callback: it waits for both rows and hands you resolved, non-optional values.