Definition
Tasks pass through multiple agents in a fixed order; the output of each step becomes the input of the next.
Category: Information flow
When to use
Research → analyze → write, requirements → design → build → test, ETL-style well-defined flows.
When not to use
When the task structure is unknown, or when you need heavy dynamic branching or parallel exploration.
How to implement
- Model the flow as fixed steps; each step declares input/output schemas.
- Validate every step's output — don't pass raw natural language between steps.
- Allow per-step retry on failure rather than re-running the whole pipeline.
- Insert a verifier or human approval at critical nodes.
Minimal pseudocode
TypeScript
const pipeline = [researchAgent, analystAgent, writerAgent, editorAgent];
let state = { input: userTask };
for (const agent of pipeline) {
state = await agent.run(state);
validate(agent.outputSchema, state);
}
return state.final;
Recommended trace events
pipeline.startedpipeline.step.startedpipeline.step.completedpipeline.completed
Common failure modes
- Upstream hallucinations get repackaged downstream as more credible.
- Fixed flows don't fit dynamic tasks.
- Missing per-step checkpoints.
Implementation checklist
- Input/output schemas defined.
- Each agent's permission boundary defined.
- Every agent call carries a run id / trace id.
- Failure, timeout, cancel, and retry strategies defined.
- Context passed is the minimum required, not the full history.
- High-risk actions are gated by approval or a verifier.