Overview
Hierarchical agent orchestration involves organizing multiple agents in structured layers to efficiently handle complex tasks. There are several key architectures available, each with distinct characteristics and use cases.Installation
Architecture Comparison
Core Architectures
Hybrid Hierarchical-Cluster Swarm (HHCS)
Hybrid Hierarchical-Cluster Swarm (HHCS) is an architecture that uses a Router Agent to analyze and distribute tasks to other swarms.- Each task is routed to one specialized swarm based on its requirements
batched_run()routes many tasks concurrently, each to its own swarm- Ideal for complex, multi-domain tasks and enterprise-scale operations
- Provides clear task routing but requires more complex setup
Auto Agent Builder
Auto Agent Builder (AutoAgentBuilder) is a dynamic agent architecture that creates specialized agents on demand.
- A builder agent analyzes the task and designs a roster of up to
max_agentsagents (default 5), each with its own name, description, system prompt and model run()returns constructedAgentobjects, or the raw configuration dicts whenreturn_dict=True- It does not run the agents. Hand them to a structure such as
SwarmRouterorHierarchicalSwarmto execute the task - Best suited for evolving requirements and dynamic workloads
SwarmRouter
SwarmRouter is a flexible system supporting multiple swarm architectures through a simple interface. You pick the architecture withswarm_type, including:
- Sequential workflows
- Concurrent workflows
- Hierarchical swarms
- Group chat interactions
- Mixture of agents, majority voting, debate, council and planner-worker patterns
swarm_type.
Use Case Recommendations
HHCS
Best for:- Enterprise-scale operations
- Multi-domain problems
- Complex task routing
- Parallel processing needs
Auto Agent Builder
Best for:- Dynamic workloads
- Evolving requirements
- Research and development
- Exploratory tasks
SwarmRouter
Best for:- General purpose tasks
- Quick deployment
- Mixed workflow types
- Smaller scale operations
Best Practices for Selection
Evaluate Task Complexity
- Simple tasks: SwarmRouter
- Complex, multi-domain tasks: HHCS
- Dynamic, evolving tasks: Auto Agent Builder
Consider Scale
- Small scale: SwarmRouter
- Large scale: HHCS
- Variable scale: Auto Agent Builder
Resource Availability
- Limited resources: SwarmRouter
- Abundant resources: HHCS or Auto Agent Builder
- Dynamic resources: Auto Agent Builder
Development Time
- Quick deployment: SwarmRouter
- Complex system: HHCS
- Experimental system: Auto Agent Builder