Skip to main content
Flow validators check the execution patterns of your agent - the order in which tools are called and whether operations run in parallel.

seq!

Validates that execution spans match a sequence pattern. This is a top-level validator that checks the order of tool calls.
The seq! validator checks that the specified spans appear in order in the execution trace.

Basic Sequence

Wildcard Patterns

Use wildcards to match flexible sequences:

Span Validation Within Sequence

Validate span inputs, outputs, and timing within the sequence:

any! Pattern

Match any span meeting certain criteria:

Nested parallel! in Sequences

Check for parallel execution within a sequence:
With span validation inside parallel:

parallel!

Validates that specified spans executed in parallel (overlapping time ranges). This can be used as a top-level validator or nested within seq!.

Basic Parallel Check

This validates that all three spans had overlapping execution times.

With Tolerance

Network latency and scheduling can cause slight timing variations. Use tolerance to account for this:

With Span Validation

Validate inputs/outputs of parallel spans:

Complete Examples

Basic Flow Validation

Comprehensive Flow Validation

Parallel Tool Execution

Mixed Sequential and Parallel

How Parallel Detection Works

Two spans are considered parallel if their execution times overlap:
With tolerance, spans starting within the tolerance window are still considered parallel:

Tips

Use seq! with wildcards (...) for flexible matching when you care about the order of key operations but not every intermediate step.
Flow validators require execution tracing to be enabled. Tracing is automatically enabled when running evals.
Be careful with strict timing requirements in parallel!. Network conditions and system load can affect timing. Use appropriate tolerance values.