Documentation Index
Fetch the complete documentation index at: https://docs.swarms.world/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Hybrid Hierarchical-Cluster Swarm (HHCS) is an advanced AI orchestration architecture that combines hierarchical decision-making with parallel processing capabilities. HHCS enables complex task solving by dynamically routing tasks to specialized agent swarms based on their expertise and capabilities.Installation
Purpose
HHCS addresses the challenge of efficiently solving diverse and complex tasks by:- Intelligently routing tasks to the most appropriate specialized swarms
- Enabling parallel processing of multifaceted problems
- Maintaining a clear hierarchy for effective decision-making
- Combining outputs from multiple specialized agents for comprehensive solutions
Architecture Diagram
The HHCS architecture follows a hierarchical structure with the router agent at the top level, specialized swarms at the middle level, and individual agents at the bottom level.Attributes
The name of the swarm instance
Brief description of the swarm’s functionality
List of available swarm routers that the HHCS can route tasks to
Maximum number of processing loops
Format for output (e.g., “list”, “json”)
LLM model used by the router agent for task analysis and routing decisions
Methods
run()
Processes a single task through the swarm system. The router agent analyzes the task and routes it to the most appropriate specialized swarm.task(str): The task to process
batched_run()
Processes multiple tasks in parallel through the swarm system.tasks(List[str]): List of task strings to process
find_swarm_by_name()
Retrieves a swarm by its name from the available swarms.swarm_name(str): Name of the swarm to find
route_task()
Routes a task to a specific swarm by name.swarm_name(str): Name of the target swarmtask_description(str): The task to route
get_swarms_info()
Returns formatted information about all available swarms.Usage Examples
Full Legal Practice Example
Features
- Router-based task distribution: Central router agent analyzes incoming tasks and directs them to appropriate specialized swarms
- Hybrid architecture: Combines hierarchical control with clustered specialization
- Parallel processing: Multiple swarms can work simultaneously on different aspects of complex tasks
- Flexible swarm types: Supports both sequential and concurrent workflows within swarms
- Comprehensive result aggregation: Collects and combines outputs from all contributing swarms
How It Works
- Task Input: A task is submitted to the HHCS
- Router Analysis: The router agent analyzes the task requirements
- Swarm Selection: The most appropriate specialized swarm is selected based on the task analysis
- Task Routing: The task is routed to the selected swarm for processing
- Parallel Processing: The selected swarm’s agents process the task (sequentially or concurrently depending on swarm type)
- Result Collection: Outputs from all contributing agents are collected into the conversation history
- Final Output: The aggregated results are returned