Team Based Artchitectures
Multi-agent Systems
An agent uses an LLM to control application flow. However, as systems grow complex, using a single agent can become challenging. This is where multi-agent systems come in.
Why Use Multiple Agents?
- Simplicity: Break complex tasks into manageable pieces
- Expertise: Create specialized agents for specific tasks
- Better Control: Manage how agents work together
Common Multi-agent Patterns
-
Network Pattern
- Agents can communicate freely with every other agent
- Any agent can decide which other agent to call next
- Flexible but potentially complex to manage
-
Supervisor Pattern
- Central supervisor coordinates other agents
- Clear control flow through supervisor
- Better oversight and management
- Can be implemented through tool-calling
-
Hierarchical Pattern
- Supervisors of supervisors
- Allows for more complex control flows
- Suitable for large-scale systems
-
Custom Workflow Pattern
- Agents communicate with specific subset of agents
- Parts of flow are deterministic
- Limited decision-making about which agents to call next
We will build our agent using a supervisor based multi-agent pattern.
Supervisor-Based Agent Architecture
A team-based architecture typically consists of three main components:
-
Supervisor Agent
- Coordinates team activities
- Makes routing decisions
- Ensures task completion
-
Specialist Agents
- Handle domain-specific tasks
- Maintain focused expertise
- Provide detailed analysis
-
State Management System
- Maintains conversation context
- Tracks team progress
- Manages shared resources

Implementation Pattern
The code implements a team-based architecture using langgraph with three essential components that work together to process complex tasks: