Sequential patterns in workflow architecture allow you to build multi-agent pipelines where agents execute in a predefined order. Each agent processes data and passes its output to the next agent in the chain.Documentation Index
Fetch the complete documentation index at: https://docs.atthene.com/llms.txt
Use this file to discover all available pages before exploring further.
Sequential Execution
In sequential patterns, agents execute one after another in a fixed order. You define explicit edges to control the flow:Sequential patterns are ideal when you have a clear, linear workflow and want each agent to build on the previous agent’s output.
Core Concepts
Special Nodes
__start__(orSTART): Entry point — first agent receives user input__end__(orEND): Exit point — final agent’s output is returned to user
__start__/__end__ or START/END in your YAML.
Every workflow must have a path from __start__ to __end__.
Entry Point
Theentry_point field specifies which agent runs first:
- Agent name (e.g.,
"assistant"): An edge from__start__to this agent is added automatically. You can still define an explicit__start__ → agentedge, but it’s not required. "START": No automatic edge is created. You must define your own edge from__start__(useful for conditional routing from start).
Passing Data Between Agents
Each agent in the sequence receives the previous agent’s output. You can access it in two ways: 1. Direct access (free-form text): The previous agent’s output is automatically available in the agent’s context. 2. Structured output (typed data): Define schemas for agent outputs and reference specific fields in subsequent agents.Learn more about structured output: Structured Output →
Basic Sequential Chain
Single Agent Flow
Sequential Chain with Structured Output
Using structured output for reliable data passing:The
responder agent accesses the analyzer’s structured output using template variables: {{ analyzer.output.sentiment }}, {{ analyzer.output.confidence }}, etc.Research → Analysis Pipeline
Multi-agent workflow where a ReAct agent uses tools to gather data with structured output, then an LLM agent analyzes the findings:The
researcher agent uses tavily_search to gather data and outputs structured findings. The analyst agent then references {{ researcher.output.key_findings }} and other fields to generate insights.When to Use Sequential Patterns
Use sequential patterns when:
- You have a clear, linear workflow
- Each step depends on the previous step’s output
- You want type-safe data passing between agents
- The execution order is predictable
For dynamic routing, see Supervisor Pattern → or Conditional Edges →
Best Practices
Advanced Patterns
For more complex routing logic:Conditional Edges
Add dynamic routing based on agent output
Supervisor Pattern
Use intelligent task delegation instead of fixed edges
Common Use Cases
Content Pipeline
Content Pipeline
Pattern: Sequential chainResearch → Draft → Edit → PublishEach agent specializes in one stage of content creation.
Data Processing Pipeline
Data Processing Pipeline
Pattern: Sequential chain with toolsCollector (web search) → Analyzer (calculator) → Reporter (synthesis)Each agent uses specific tools for its task.
Sentiment Analysis Pipeline
Sentiment Analysis Pipeline
Pattern: Sequential with structured outputAnalyzer (structured output) → Responder (uses analyzer data)First agent produces typed data, second agent consumes it via template variables.
Quality Assurance Flow
Quality Assurance Flow
Pattern: Sequential with conditional edgesWriter → Reviewer → [Approve → Publish | Reject → Writer]Add conditional edges for dynamic routing based on quality checks.
Next Steps
Conditional Edges
Add dynamic routing to workflows
Supervisor Pattern
Learn about supervisor-based coordination
Agent Types
Understand different agent types for workflows
YAML Configuration
Complete reference for workflow configuration