Multi-Agent Pipelines

Build sequential agent pipelines where each agent builds on the previous stage's output.

How it works

A multi-agent pipeline chains agents sequentially. Each agent receives the output of the previous agent as its input:

researcherwriterreviewer

Create a multi-agent project

1

Interactive mode

npx agentvoy create my-project

Choose AppMulti-agent → set agent count and names.

2

Non-interactive mode

npx agentvoy create my-project --build-mode app --agent-mode multi --yes

Creates a default 3-agent pipeline: researcher → writer → reviewer.

Project structure

my-project-app/
src/
agents/
researcher.py # Stage 1
writer.py # Stage 2
reviewer.py # Stage 3
pipeline.py # Orchestration
server.py # FastAPI (calls pipeline)
streamlit_app.py # Chat UI with stage display

How pipeline.py works

"""Multi-agent pipeline — agents run in sequence."""
from agentvoy_guard import Guard

guard = Guard.from_config()

def run_pipeline(prompt: str) -> dict:
    with guard.session() as session:
        session.check_input(prompt)

        # Stage 1: Researcher
        from src.agents.researcher import run_agent as research
        research_result = research(prompt)
        session.tick()

        # Stage 2: Writer (receives researcher's output)
        from src.agents.writer import run_agent as write
        writer_result = write(research_result)
        session.tick()

        # Stage 3: Reviewer (receives writer's output)
        from src.agents.reviewer import run_agent as review
        final_result = review(writer_result)
        session.tick()

        session.check_output(str(final_result))

    return {
        "result": final_result,
        "stages": ["researcher", "writer", "reviewer"],
        "guard_summary": guard.last_summary,
    }

Customizing your agents

Each agent file has the same structure. Customize the system prompt and tools for each stage:

# src/agents/researcher.py
def create_agent():
    """Customize the system prompt for this stage."""
    agent = AssistantAgent(
        name="researcher",
        system_message="""You are a research specialist.
Your job is to gather information and present findings clearly.
Focus on facts and cite sources.""",
        ...
    )
    return agent

DevTools pipeline view

The DevTools dashboard shows pipeline progress in real time:

researcher (done)writer (done)reviewer (running)

Framework-specific behavior

CrewAI and Google ADK handle multi-agent orchestration internally. When you use these frameworks with multi-agent mode, AgentVoy generates their native crew/sub-agent structure instead of a pipeline.py file.

All other frameworks (OpenAI, Anthropic, LangGraph, LlamaIndex, AutoGen) use the sequential pipeline.