Skip to main content

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

Swarms provides a wide range of multi-agent architectures designed for different use cases, from simple round-robin task distribution to complex hierarchical orchestration. This page provides a comprehensive overview to help you select the right architecture for your needs.

Installation

pip install -U swarms

Core Architectures

ArchitectureUse CaseKey Functionality
MajorityVotingDecision making through consensusCombines multiple agent opinions and selects the most common answer
AgentRearrangeOptimizing agent orderDynamically reorders agents based on task requirements
RoundRobinEqual task distributionCycles through agents in a fixed order
Mixture of AgentsComplex problem solvingCombines diverse expert agents for comprehensive analysis
GroupChatCollaborative discussionsSimulates group discussions with multiple agents
SpreadSheetSwarmData processingCollaborative data processing and analysis
SwarmRouterTask routingRoutes tasks to appropriate agents based on requirements
MultiAgentRouterAdvanced task routingRoutes tasks to specialized agents based on capabilities

Workflow Architectures

ArchitectureUse CaseKey Functionality
ConcurrentWorkflowParallel task executionExecutes multiple tasks simultaneously
SequentialWorkflowStep-by-step processingExecutes tasks in a specific sequence
GraphWorkflowComplex task dependenciesManages tasks with complex dependencies

Hierarchical Architectures

ArchitectureUse CaseKey Functionality
HierarchicalSwarmHierarchical task orchestrationDirector agent coordinates specialized worker agents
Hybrid Hierarchical-Cluster SwarmComplex organizationCombines hierarchical and cluster-based organization
Auto Swarm BuilderAutomated swarm creationAutomatically creates and configures swarms

Communication Structure

The Conversation documentation details the communication protocols and structures used between agents in these architectures.

Choosing the Right Architecture

Task Complexity — Simple tasks may only need basic architectures like RoundRobin, while complex tasks might require Hierarchical or Graph-based approaches.
Parallelization Needs — If tasks can be executed in parallel, consider ConcurrentWorkflow or SpreadSheetSwarm.
Decision Making Requirements — For consensus-based decisions, MajorityVoting is ideal.
Resource Optimization — If you need to optimize agent usage, consider SwarmRouter or MultiAgentRouter.
Dynamic Adaptation — For tasks requiring dynamic adaptation, consider Auto Swarm Builder.

Architecture Selection Guide

By Task Type

Task TypeRecommended Architecture
Simple, sequential tasksSequentialWorkflow, RoundRobin
Parallel, independent tasksConcurrentWorkflow, SpreadSheetSwarm
Consensus-based decisionsMajorityVoting
Complex multi-domain tasksHierarchicalSwarm, HHCS
Dynamic, evolving tasksAuto Swarm Builder
Collaborative analysisGroupChat, Mixture of Agents
Task routingSwarmRouter, MultiAgentRouter

By Scale

ScaleRecommended Architecture
2-5 agentsRoundRobin, SequentialWorkflow, AgentRearrange
5-20 agentsSwarmRouter, GroupChat, ConcurrentWorkflow
20+ agentsHierarchicalSwarm, HHCS, SpreadSheetSwarm
Variable/dynamicAuto Swarm Builder
For more detailed information about each architecture, refer to their respective documentation pages linked in the tables above.