liveBook · Manning

Pipeline

As explained in AI Agents in Action, Second Edition

Ingestion is the phase of preparing source documents by loading, transforming, embedding, and storing them for later retrieval.

A pipeline moves work through ordered stages. In an agent-to-agent pipeline, one agent finishes before the next begins and passes its output downstream. This suits tasks whose order is known in advance. section 4.1.3

A sequence of prompt steps is called prompt chaining. An agent pipeline goes further: each agent can make decisions and use tools, while passing a concise, typed result to the next agent. Use deterministic checks where a pass/fail decision must be repeatable. section 2.4 section 4.6

An ingestion pipeline

In retrieval-augmented generation (RAG), ingestion prepares a supplied document, such as a PDF, for later questions: load it, transform it into context chunks, embed the chunks as vectors, then store them in a searchable vector database. Retrieval is a separate phase: it finds relevant chunks and supplies them as context for an answer. These are ordered processing stages, not necessarily separate agents. section 6.1.1

Table 4.4 Architectural patterns overview

Pattern

When to use

When not to use

Sequential pipeline, agent to agent

Well-defined, ordered tasks need to be executed in sequence.

Not all agents need to be executed every time.

Parallel delegation

Multiple tasks or agents can be executed in parallel to improve performance.

Hierarchical coordination

The user interface agent delegates to multiple agents on behalf of the user.

No need for complex decision-­making or command of agents

Iterative debate and refinement

You want to review and double- or triple-check responses.

The problem is trivial or aligns well with simple execution.

Voting/best-of-N (ensemble)

Ambiguous problems that may have multiple interpretations or facets

Unambiguous problems

Role-playing collaboration

High creativity and novel outputs are desired and align well with the principal goals.

Real-time systems or cases with low desired creativity

Conditional routing (branching)

Customer support systems that may require human approvals or intervention

Peer-to-peer network

Decentralized command increases system robustness and reduces or eliminates complete failure.

Use the pattern comparison to check whether an ordered pipeline fits. If some agents need not run every time, consider a different coordination pattern. section 4.1.3

Start with the simplest flow that works. Add parallel execution, delegation, or review loops only when the task calls for them; protect transfers between agents with validation so bad data does not travel downstream. section 4.1.3 section 4.6

How AI Agents in Action, Second Edition covers it

How deep it goes
Defines sequential agent coordination and enumerates ingestion stages, while deferring detailed ingestion implementation.
Examples
Uses an agent coordination pattern comparison and a PDF-to-vector-store RAG scenario.
What it assumes
Introduces prompt chaining as sequential prompt steps and distinguishes it from agents that can decide when to use tools.
What you can do after
Build it from scratch as ordered agent stages with typed outputs and deterministic checkpoints, or identify the stages of RAG ingestion.
How it connects
Connects pipelines to prompt chaining, agent handoffs, deterministic checks, and retrieval-augmented generation.

Also explained in

Compare how 48 books explain pipeline →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents in Action, Second Edition. The section links point to the parts of the book it draws on.