Skip to main content
Use a parallel branch node to run multiple branches of your agentic workflow at the same time. When conditions match, the node runs every matching path so you can complete independent work in parallel. Parallel branch nodes differ from conditions branch nodes in these ways:

Configuring unconditional parallel branch

To configure an unconditional parallel branch node, call the parallel() method in your agentic workflow. Use this node when you want every branch to run every time. Define the following parameters in this method: Use unconditional parallel when you need to:
  • Run multiple teams at the same time
  • Send work to multiple services at the same time
  • Process data through multiple pipelines at the same time
evaluator
Union[Conditions, None]
Set to None for unconditional execution. All branches run.
name
string
Name for the parallel node. watsonx Orchestrate generates this value if you do not provide it.
display_name
string
Display name for the parallel node.
Example

Configuring conditional parallel branch

To configure a conditional parallel node, call the parallel_conditions() method in your agentic workflow. Use this node when you want to run every branch whose condition matches. Define the following parameters in this method: Use conditional parallel when you need to:
  • Process work based on multiple criteria
  • Route work to multiple handlers based on attributes
  • Fan out work only when conditions match
name
string
required
Name for the parallel node. watsonx Orchestrate generates this value if you leave it empty.
display_name
string
Display name for the parallel node. The default value is the node name.

Adding conditions to parallel branch

To add conditions to the parallel branch node, call the condition() method. The node runs all matching conditions in parallel. Define the following parameters in this method:
to_node
Node
required
Node to run when the condition matches.
expression
string
Python expression to evaluate. Required unless default=True.
default
bool
When set to True, this parameter defines the default case.
Example

Expression syntax

Conditions in parallel agentic workflows use Python expressions that can access:
  • flow.input.* - Input data
  • flow.private.* - Private state
  • flow.output.* - Output data from upstream nodes
The following examples show common expression patterns you can use:

Common patterns

The following examples show common ways to use parallel nodes in your agentic workflows:
Use this pattern to process data through multiple independent handlers:

Best practices

Follow these best practices when you work with parallel nodes:
  • Use parallel() when every branch must run
  • Use parallel_conditions() when branch execution depends on conditions
  • Use conditions() (branch) when only one path must run. For more information, see the Conditions branch node
Important:Do not create parallel paths that loop back to previous nodes. This pattern creates unlimited parallel threads and can cause runtime issues.
The following example shows an incorrect pattern:
Parallel agentic workflows merge at the END node inside the parallel subagentic workflow. The parent agentic workflow continues only after every parallel branch completes.
Example
Each parallel branch can fail independently. Add error handling so you can manage failures:

Example: Feature delivery agentic workflow

This example shows how you can use both conditional and unconditional parallel processing to complete feature delivery work.
Example