The Sequential Pipeline Pattern: When Order Matters

· 5 min read

The Assembly Line for AI Work

The Sequential Pipeline is the simplest coordination pattern to understand: Agent A does its work, passes the output to Agent B, who passes to Agent C, and so on. Each agent transforms or enriches the work product before handing it downstream.

It's an assembly line. And like a physical assembly line, it's extraordinarily effective when the work has a natural sequence — and a poor choice when it doesn't.

How It Works

In a Sequential Pipeline, agents are ordered into stages. Each stage has a clearly defined input (what it receives from the previous agent) and output (what it passes to the next agent). The pipeline flows in one direction. No agent reaches back to a previous stage or skips ahead.

A four-stage pipeline for producing a market report might look like this:

  1. Data Gatherer — collects and organizes raw market data, competitor information, and industry metrics
  2. Analyst — interprets the data, identifies patterns, calculates market sizing, and draws preliminary conclusions
  3. Writer — transforms the analysis into a polished, executive-ready narrative with clear recommendations
  4. Fact-Checker — verifies claims against source data, flags unsupported assertions, and checks internal consistency

Each agent receives a richer, more refined work product than the last. The Data Gatherer works with raw information. The Analyst works with organized data. The Writer works with structured analysis. The Fact-Checker works with a near-final document.

When to Use Sequential Pipelines

Tasks With Natural Phases

Some work simply can't happen out of order. You can't write a report before analyzing the data. You can't analyze data before collecting it. When the task has clear phases where each phase requires the previous phase's output, a pipeline is the right pattern.

Quality Through Specialization

Each agent in a pipeline is a specialist in its stage. The Writer doesn't need to understand data collection methodology — it just needs to translate analysis into clear prose. This specialization means each agent's prompt can be focused and specific, which produces better output than asking a single agent to do everything.

Progressive Refinement

Pipelines naturally produce refinement. Each stage adds a layer of quality. Raw data becomes structured analysis becomes polished narrative becomes verified output. The final product has been touched by four specialized perspectives rather than one generalist.

Designing Handoff Contracts

The most critical design decision in a pipeline is the handoff contract — what exactly passes between stages.

Vague handoffs produce vague results. If the Data Gatherer's output is an unstructured dump of information, the Analyst wastes effort organizing it instead of analyzing it.

Define explicit output formats for each stage:

Each handoff contract should specify the structure, required fields, and quality bar for the output. Think of it as an API contract between stages — the clearer the interface, the more reliable the pipeline.

The Error Propagation Problem

Here's the critical risk with pipelines: errors compound. If the Data Gatherer includes an incorrect market size figure, the Analyst builds conclusions on it, the Writer presents those conclusions confidently, and the Fact-Checker may not catch it if the error is plausible.

This is the assembly line's weakness. A defect introduced in Stage 1 gets built into every subsequent stage.

Mitigation Strategies

Build verification into each stage. Don't rely solely on the final Fact-Checker. Each agent should sanity-check its inputs before processing them. The Analyst should flag data points that seem implausible. The Writer should note conclusions that feel weakly supported.

Include source tracing. Require every claim to trace back to its source data. If the Analyst says "the market is growing at 15% annually," that should link to the specific data point from the Data Gatherer. This makes the Fact-Checker's job possible rather than theoretical.

Add a feedback signal. If the Fact-Checker finds significant errors, the pipeline output should clearly flag them rather than silently patching them. You need to know when upstream stages are producing unreliable work.

Sequential Pipeline vs. Other Patterns

Use Pipeline when the work has a clear linear sequence and each stage genuinely requires the previous stage's output to function.

Use Parallel Workers when the stages are actually independent. If your "pipeline" has stages that don't use each other's output, you're adding latency for no reason. Run them simultaneously instead.

Use Supervisor-Worker when the task plan might change based on intermediate results. Pipelines are rigid — the stages are predefined. If Stage 2's output might mean Stage 3 needs to be completely different, you need a Supervisor that can adapt the plan dynamically.

Use Advisory Debate when the goal is evaluating a decision rather than producing a deliverable. Pipelines produce output; debates produce judgment.

When NOT to Use Pipelines

When Stages Are Actually Independent

If your four agents don't need each other's output, forcing them into a sequence just makes everything take four times longer. Test this by asking: "Could Agent C do its job without seeing Agent B's output?" If yes, you have parallel work masquerading as a pipeline.

When Iteration Is Needed

Pipelines flow forward. If the work requires back-and-forth — the writer needs the analyst to clarify a finding, or the analyst needs more data from the gatherer — a pipeline can't accommodate that. You need the Supervisor-Worker pattern, where the Supervisor can route work back to previous stages.

When the Task Is Exploratory

Exploration doesn't follow a predetermined path. If you're not sure what the stages should be until you see intermediate results, a fixed pipeline is the wrong structure. Use Supervisor-Worker and let the Supervisor determine the next step dynamically.

The Bottom Line

The Sequential Pipeline pattern is powerful precisely because it's constrained. The rigid structure — clear stages, defined handoffs, forward-only flow — eliminates coordination overhead and produces consistent, progressively refined output.

Use it when your work genuinely flows in one direction. Resist the temptation to force sequential structure onto work that's actually parallel or dynamic. And always design your handoff contracts before you design your agent prompts — the interfaces between stages matter more than the stages themselves.

Build a Sequential Pipeline agent team →