Why Use Multiple Agents?
Specialization
Each agent focuses on a specific task (research, analysis, writing) leading to better results
Modularity
Update or replace individual agents without affecting the entire system
Scalability
Add new capabilities by adding new specialized agents
Maintainability
Simpler prompts and configurations per agent make systems easier to debug and improve
Architecture Types
AMAS supports multiple architectures for coordinating agents:Supervisor Architecture
A central supervisor agent coordinates and routes tasks to specialized worker agents.- You need dynamic task routing based on request content
- Your system handles multiple domains (e.g., research + analysis + writing)
- The routing logic is complex and benefits from LLM decision-making
Workflow Architecture
Explicit edges define the exact flow of execution between agents.- You have a predefined sequence of steps
- You need deterministic, repeatable workflows
- You want precise control over execution order
Key Concepts
Structured Output
Agents can produce typed, validated data that subsequent agents consume. This enables reliable data passing between agents.Agent Communication
Agents access previous agents’ outputs using template variables in their prompts:Conditional Routing
In workflow architecture, you can add dynamic routing based on agent outputs. There are two types: Literal routing — choose from a list of agents:Common Patterns
Research → Analysis → Writing Pipeline
Sequential workflow where each agent builds on the previous:Classification → Routing → Specialized Handling
Supervisor dynamically routes to specialists:Quality Gate with Revision Loop
Workflow with conditional routing for quality checks:Best Practices
What’s Next?
Sequential Patterns
Build linear multi-agent pipelines with structured data passing
Supervisor Pattern
Coordinate agents with dynamic routing and task delegation
Conditional Edges
Add dynamic routing logic to your workflows
Structured Output
Generate typed, validated data for agent-to-agent communication