home/glossary/Pipeline Pattern
Agent Architecture Patterns

Pipeline Pattern

definition

The pipeline pattern chains agent steps in a fixed sequence where each step's output becomes the next step's input, creating a predictable, linear workflow for tasks with clear stages. Unlike the flexible orchestrator pattern where the boss agent decides the order dynamically, pipelines enforce a predetermined sequence — like lint → test → fix → verify — making them more deterministic and easier to monitor in production.

The pipeline pattern chains agent steps in a fixed sequence where each step's output becomes the next step's input, creating a predictable, linear workflow for tasks with clear stages. Unlike the flexible orchestrator pattern where the boss agent decides the order dynamically, pipelines enforce a predetermined sequence — like lint → test → fix → verify — making them more deterministic and easier to monitor in production. Each stage can use a different model, different tools, and different system prompts optimized for that specific subtask, enabling cost optimization by using smaller models for simpler stages. The trade-off is rigidity: pipelines handle linear workflows well but struggle with tasks that require iteration or dynamic branching. This concept connects to the orchestrator pattern for the more flexible alternative, tool composition for composing primitives within pipeline stages, and CI/CD agents for one of the most natural applications of the pipeline pattern.