---
title: "Prompt chaining pattern for AI agents | Agentic Pattern Language"
description: "Split a task into fixed steps; each call works on the output of the one before. Sourced from Anthropic, Vercel, and Microsoft."
url: https://agenticpatternlanguage.com/patterns/prompt-chaining/
---

3 [Systems of agents](https://agenticpatternlanguage.com/#systems-of-agents)

# Prompt chaining

Split a task into fixed steps; each call works on the output of the one before.

Also called Sequential orchestration, Pipeline, Linear delegation, Sequential pattern

Anthropic, Vercel, Microsoft, Amazon Web Services, Google Cloud

[How to read this](https://agenticpatternlanguage.com/notation/)

## Alternatives

* [Parallelization](https://agenticpatternlanguage.com/patterns/parallelization/)
* [Orchestrator and workers](https://agenticpatternlanguage.com/patterns/orchestrator-workers/)

## The problem

The task splits cleanly into fixed steps, and each step is easier for a model alone.

> This workflow is ideal for situations where the task can be easily and cleanly decomposed into fixed subtasks. The main goal is to trade off latency for higher accuracy, by making each LLM call an easier task.

Anthropic [Building effective AI agents](https://www.anthropic.com/engineering/building-effective-agents) Dec 19, 2024

> The sequential orchestration pattern solves problems that require step-by-step processing, where each stage builds on the previous stage.

Microsoft [AI agent orchestration patterns](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns)

## Therefore

> Prompt chaining decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one.

Anthropic [Building effective AI agents](https://www.anthropic.com/engineering/building-effective-agents) Dec 19, 2024

> The sequential orchestration pattern chains AI agents in a predefined, linear order. Each agent processes the output from the previous agent in the sequence, which creates a pipeline of specialized transformations.

Microsoft [AI agent orchestration patterns](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns)

> Prompt chaining decomposes complex tasks into a sequence of steps, where each step is a discrete LLM invocation that processes or builds upon the output of the previous one.

Amazon Web Services [Workflow for prompt chaining](https://docs.aws.amazon.com/prescriptive-guidance/latest/agentic-ai-patterns/workflow-for-prompt-chaining.html)

## In use

Vercel v0

> While the base model streams output, v0 is constantly checking the output stream for errors, inconsistencies, and best practice violations. Our custom AutoFix model handles many of these issues mid-stream to further improve output quality.

Vercel [Introducing the v0 composite model family](https://vercel.com/blog/v0-composite-model-family) Jun 1, 2025

## Where it breaks

An early mistake carries into every later step, and the fixed order cannot adapt.

> Early stages might fail or produce low-quality output, and there's no reasonable way to prevent later steps from processing by using accumulated error output.

Microsoft [AI agent orchestration patterns](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns)

> The rigid, predefined structure of the pipeline makes it difficult to adapt to dynamic conditions or to skip unnecessary steps

Google Cloud [Choose a design pattern for your agentic AI system](https://cloud.google.com/architecture/choose-design-pattern-agentic-ai-system)

## Sources

1. [Building effective AI agents](https://www.anthropic.com/engineering/building-effective-agents) Anthropic, Dec 19, 2024
2. [Introducing the v0 composite model family](https://vercel.com/blog/v0-composite-model-family) Aryaman Khandelwal, Gaspar Garcia, Ido Pesok, Max Leiter, Vercel, Jun 1, 2025
3. [AI agent orchestration patterns](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns) Microsoft
   > The sequential orchestration pattern is also known as a pipeline, prompt chaining, or linear delegation.
4. [Workflow for prompt chaining](https://docs.aws.amazon.com/prescriptive-guidance/latest/agentic-ai-patterns/workflow-for-prompt-chaining.html) Amazon Web Services
5. [Choose a design pattern for your agentic AI system](https://cloud.google.com/architecture/choose-design-pattern-agentic-ai-system) Google Cloud
   > The multi-agent sequential pattern executes a series of specialized agents in a predefined, linear order where the output from one agent serves as the direct input for the next agent.

Added Nov 14, 2026
