Pipe Controllers
MTHDS Standard Reference
Pipe controllers are part of the MTHDS open standard. For the authoritative language specification, see Pipes & Controllers on mthds.ai. This page documents Pipelex-specific behavior and usage.
Pipe controllers are the orchestrators of a Pipelex pipeline. While Pipe Operators perform the work, pipe controllers define the method and manage the execution logic. They allow you to run other pipes in sequence, in parallel, or conditionally.
Core Controllers
Here are the primary pipe controllers available in Pipelex:
PipeSequence: The most fundamental controller. It runs a series of pipes one after another, passing the results from one step to the next.PipeParallel: Executes multiple independent pipes at the same time, significantly speeding up methods where tasks don't depend on each other.PipeBatch: Performs a "map" operation. It takes a list of items and runs the same pipe on every single item in parallel.PipeCondition: Adds branching logic (if/else) to your pipeline. It evaluates an expression and chooses which pipe to run next based on the result.
Overview
Pipelex provides the following pipe operators:
PipeSequence: For chaining multiple pipes in sequencePipeParallel: For running different pipes in parallelPipeBatch: For running one pipe over a batch of inputsPipeCondition: For conditional execution based on input validation
PipeSequence
Run multiple pipes in sequence.
Key Features
- Sequential execution
- Working memory management
- Sub-pipe handling
- Pipeline composition
PipeCondition
Enables conditional execution based on input validation.
Key Features
- Expression-based routing
- Default fallback paths
- Jinja2 template support
- Input validation
- Error handling