Defining Control Flow
Here are some examples of how to represent different graphs using the Vellum Workflows SDK.
Single Node Workflow
A single Node Workflow is the simplest possible Workflow, consisting of just one Node.
Serial Execution Between Two Nodes
Two Nodes connected in sequence, where the output of the first Node flows into the second Node. This is a fundamental pattern in Workflow design where a downstream operation directly depends on the output of an upstream operation.
Single Node Branches to Two Parallel Nodes
Here a single Node branches into two parallel execution paths, allowing multiple operations to run independently after the initial Node completes. This pattern is useful when you need to perform parallel processing or handle multiple aspects of a Workflow simultaneously.
Two Parallel Nodes Merge into One Node
Here two parallel execution paths merge back together into a single Node. This pattern is useful when you need to combine the results of multiple parallel operations before proceeding with the rest of the Workflow.
Loops
Loops are a powerful pattern in Workflow design that allow you to repeat a series of operations until a certain condition is met. Many agentic AI systems tend to include loops.
Map
The Map pattern is useful when you need to apply the same operation to a list of items.