Workflow Blocks
Checkpoints
Validate workflow states using natural language assertions
Checkpoints allow you to create validation points in your workflow using natural language assertions. If an assertion fails, the workflow stops immediately to prevent incorrect execution.
Overview
Checkpoints help ensure:
- Data consistency
- Process accuracy
- Validation at critical steps
- Safe workflow execution
Example
Imagine we are building an agent that orders food items for a customer via Postmates. My agent takes the list of items as an input parameter {items}
.
A useful assertion to make is that the items of my order are all listed in the confirmation screen before placing an order.
Before the action block of placing the order, we’ll add a checkpoint with the following prompt: