[Update list of multi-agent architectures]

master
Kye Gomez 1 day ago
parent b29199ce60
commit bb8368e9c0

@ -32,21 +32,20 @@ Multi-agent architectures leverage these communication patterns to ensure that a
| Graph Workflow | Agents collaborate in a directed acyclic graph (DAG) format to manage dependencies and parallel tasks. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/graph_workflow/) | AI-driven software development pipelines, complex project management |
| Group Chat | Agents engage in a chat-like interaction to reach decisions collaboratively. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/group_chat/) | Real-time collaborative decision-making, contract negotiations |
| Interactive Group Chat | Enhanced group chat with dynamic speaker selection and interaction patterns. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/interactive_groupchat/) | Advanced collaborative decision-making, dynamic team coordination |
| Agent Registry | A centralized registry where agents are stored, retrieved, and invoked dynamically. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/agent_registry/) | Dynamic agent management, evolving recommendation engines |
| SpreadSheet | Manages tasks at scale, tracking agent outputs in a structured format like CSV files. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/spreadsheet_swarm/) | Large-scale marketing analytics, financial audits |
| Router | Routes and chooses the architecture based on the task requirements and available agents. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/swarm_router/) | Dynamic task routing, adaptive architecture selection, optimized agent allocation |
| Heavy | High-performance architecture for handling intensive computational tasks with multiple agents. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/heavy_swarm/) | Large-scale data processing, intensive computational workflows |
| Deep Research | Specialized architecture for conducting in-depth research tasks across multiple domains. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/deep_research_swarm/) | Academic research, market analysis, comprehensive data investigation |
| De-Hallucination | Architecture designed to reduce and eliminate hallucinations in AI outputs through consensus. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/de_hallucination_swarm/) | Fact-checking, content verification, reliable information generation |
| Council as Judge | Multiple agents act as a council to evaluate and judge outputs or decisions. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/council_of_judges/) | Quality assessment, decision validation, peer review processes |
| MALT | Specialized architecture for complex language processing tasks across multiple agents. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/malt/) | Natural language processing, translation, content generation |
| Majority Voting | Agents vote on decisions with the majority determining the final outcome. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/majorityvoting/) | Democratic decision-making, consensus building, error reduction |
| Round Robin | Tasks are distributed cyclically among agents in a rotating order. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/round_robin_swarm/) | Load balancing, fair task distribution, resource optimization |
| Auto-Builder | Automatically constructs and configures multi-agent systems based on requirements. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/auto_swarm_builder/) | Dynamic system creation, adaptive architectures, rapid prototyping |
| Hybrid Hierarchical Cluster | Combines hierarchical and peer-to-peer communication patterns for complex workflows. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/hhcs/) | Complex enterprise workflows, multi-department coordination |
| Election | Agents participate in democratic voting processes to select leaders or make collective decisions. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/election_swarm/) | Democratic governance, consensus building, leadership selection |
| Dynamic Conversational | Adaptive conversation management with dynamic agent selection and interaction patterns. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/dynamic_conversational_swarm/) | Adaptive chatbots, dynamic customer service, contextual conversations |
| Tree | Hierarchical tree structure for organizing agents in parent-child relationships. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/tree_swarm/) | Organizational hierarchies, decision trees, taxonomic classification |
| Batched Grid Workflow | Executes tasks in a batched grid format, where each agent processes a different task simultaneously in parallel. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/batched_grid_workflow/) | Parallel task processing, batch operations, grid-based task distribution |
| LLM Council | Orchestrates multiple specialized LLM agents to collaboratively answer queries through structured peer review and synthesis. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/llm_council/) | Multi-model evaluation, peer review systems, collaborative AI decision-making |
| Debate with Judge | A debate architecture where two agents (Pro and Con) debate a topic, with a Judge agent evaluating arguments and providing refined synthesis over multiple rounds. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/debate_with_judge/) | Argument analysis, decision refinement, structured debates, iterative improvement |
| Self MoA Seq | Sequential self-mixture of agents that generates multiple candidate responses and synthesizes them sequentially using a sliding window approach. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/self_moa_seq/) | High-quality response generation, ensemble methods, sequential synthesis |
| Swarm Rearrange | Orchestrates multiple swarms in sequential or parallel flow patterns, providing thread-safe operations for managing swarm execution. | [Learn More](https://docs.swarms.world/en/latest/swarms/structs/swarm_rearrange/) | Multi-swarm coordination, complex workflow orchestration, swarm composition |
---
@ -242,6 +241,44 @@ graph TD
---
### Batched Grid Workflow
**Overview:**
Multi-agent orchestration pattern that executes tasks in a batched grid format, where each agent processes different tasks simultaneously. Provides structured parallel processing with conversation state management.
**Use Cases:**
- Parallel task processing
- Grid-based agent execution
- Batch operations
- Multi-task multi-agent coordination
**[Learn More](https://docs.swarms.world/en/latest/swarms/structs/batched_grid_workflow/)**
```mermaid
graph TD
A[Task Batch] --> B[BatchedGridWorkflow]
B --> C[Initialize Agents]
C --> D[Create Grid]
D --> E[Agent 1: Task 1]
D --> F[Agent 2: Task 2]
D --> G[Agent N: Task N]
E --> H[Collect Results]
F --> H
G --> H
H --> I[Update Conversation]
I --> J[Next Iteration]
J --> D
```
---
### Mixture of Agents
**Overview:**
@ -378,43 +415,6 @@ graph TD
---
### Agent Registry
**Overview:**
A centralized registry system where agents are stored, retrieved, and invoked dynamically. The registry maintains metadata about agent capabilities, availability, and performance metrics, enabling intelligent agent selection and management.
**Use Cases:**
- Dynamic agent management in large-scale systems
- Evolving recommendation engines that adapt agent selection
- Service discovery in distributed agent systems
**[Learn More](https://docs.swarms.world/en/latest/swarms/structs/agent_registry/)**
```mermaid
graph TD
A[Agent Registration] --> B[Registry Database]
B --> C[Agent Metadata]
C --> D[Capabilities]
C --> E[Performance Metrics]
C --> F[Availability Status]
G[Task Request] --> H[Registry Query Engine]
H --> I[Agent Discovery]
I --> J[Capability Matching]
J --> K[Agent Selection]
K --> L[Agent Invocation]
L --> M[Task Execution]
M --> N[Performance Tracking]
N --> O[Registry Update]
O --> B
```
---
### Router Architecture
**Overview:**
@ -558,6 +558,44 @@ graph TD
---
### Self MoA Seq
**Overview:**
Ensemble method that generates multiple candidate responses from a single high-performing model and synthesizes them sequentially using a sliding window approach. Keeps context within bounds while leveraging diversity across samples.
**Use Cases:**
- Response synthesis
- Ensemble methods
- Sequential aggregation
- Quality improvement through diversity
**[Learn More](https://docs.swarms.world/en/latest/swarms/structs/self_moa_seq/)**
```mermaid
graph TD
A[Task] --> B[Proposer Agent]
B --> C[Generate Samples]
C --> D[Sample 1]
C --> E[Sample 2]
C --> F[Sample N]
D --> G[Sliding Window]
E --> G
F --> G
G --> H[Aggregator Agent]
H --> I[Biased Synthesis]
I --> J{More Iterations?}
J -->|Yes| G
J -->|No| K[Final Output]
```
---
### Council as Judge
**Overview:**
@ -594,6 +632,82 @@ graph TD
---
### LLM Council
**Overview:**
Orchestrates multiple specialized LLM agents to collaboratively answer queries through structured peer review and synthesis. Different models evaluate and rank each other's work, often selecting responses from other models as superior.
**Use Cases:**
- Multi-model collaboration
- Peer review processes
- Model evaluation and synthesis
- Cross-model consensus building
**[Learn More](https://docs.swarms.world/en/latest/swarms/structs/llm_council/)**
```mermaid
graph TD
A[User Query] --> B[Council Members]
B --> C[GPT Councilor]
B --> D[Gemini Councilor]
B --> E[Claude Councilor]
B --> F[Grok Councilor]
C --> G[Responses]
D --> G
E --> G
F --> G
G --> H[Anonymize & Evaluate]
H --> I[Chairman Synthesis]
I --> J[Final Response]
```
---
### Debate with Judge
**Overview:**
Debate architecture with self-refinement through a judge agent, enabling Pro and Con agents to debate a topic with iterative refinement. The judge evaluates arguments and provides synthesis for progressive improvement.
**Use Cases:**
- Structured debates
- Argument evaluation
- Iterative refinement of positions
- Multi-perspective analysis
**[Learn More](https://docs.swarms.world/en/latest/swarms/structs/debate_with_judge/)**
```mermaid
graph TD
A[Topic] --> B[DebateWithJudge]
B --> C[Pro Agent]
B --> D[Con Agent]
B --> E[Judge Agent]
C --> F[Pro Argument]
D --> G[Con Argument]
F --> H[Judge Evaluation]
G --> H
H --> I[Judge Synthesis]
I --> J{More Rounds?}
J -->|Yes| C
J -->|No| K[Final Output]
```
---
### MALT Architecture
**Overview:**
@ -706,6 +820,47 @@ graph TD
---
### Swarm Rearrange
**Overview:**
Orchestrates multiple swarms in sequential or parallel flow patterns with thread-safe operations and flow validation. Provides comprehensive swarm management and coordination capabilities.
**Use Cases:**
- Multi-swarm orchestration
- Flow pattern management
- Swarm coordination
- Sequential and parallel swarm execution
**[Learn More](https://docs.swarms.world/en/latest/swarms/structs/swarm_rearrange/)**
```mermaid
graph TD
A[Swarm Pool] --> B[SwarmRearrange]
B --> C[Flow Pattern]
C --> D[Sequential Flow]
C --> E[Parallel Flow]
D --> F[Swarm 1]
F --> G[Swarm 2]
G --> H[Swarm N]
E --> I[Swarm 1]
E --> J[Swarm 2]
E --> K[Swarm N]
H --> L[Result Aggregation]
I --> L
J --> L
K --> L
```
---
### Hybrid Hierarchical Cluster
**Overview:**

@ -38,7 +38,10 @@ swarm = HierarchicalSwarm(
planning_enabled=True,
)
out = swarm.run(
"Conduct a research analysis on water stocks and etfs"
)
print(out)
print(swarm.display_hierarchy())
# out = swarm.run(
# "Conduct a research analysis on water stocks and etfs"
# )
# print(out)

@ -962,16 +962,18 @@ def show_features():
# Add category summary
console.print("\n[bold cyan]📊 Feature Categories:[/bold cyan]\n")
category_table = Table(
show_header=True,
header_style=f"bold {COLORS['primary']}",
border_style=COLORS["secondary"],
padding=(0, 2),
)
category_table.add_column("Category", style="bold cyan", width=20)
category_table.add_column("Count", style="bold white", justify="center", width=10)
category_table.add_column(
"Count", style="bold white", justify="center", width=10
)
category_table.add_column("Features", style="dim white", width=60)
# Count features by category

@ -34,6 +34,7 @@ from rich.live import Live
from rich.panel import Panel
from rich.table import Table
from rich.text import Text
from rich.tree import Tree
from swarms.prompts.hiearchical_system_prompt import (
HIEARCHICAL_SWARM_SYSTEM_PROMPT,
@ -748,6 +749,77 @@ class HierarchicalSwarm:
add_to_conversation=False,
)
def display_hierarchy(self) -> None:
"""
Display the hierarchical structure of the swarm using Rich Tree.
This method creates a visual tree representation showing the Director
at the top level and all worker agents as children branches. The tree
is printed to the console with rich formatting.
The hierarchy visualization helps understand the organizational structure
of the swarm, with the Director coordinating all worker agents.
"""
console = Console()
# Create the root tree with Director
director_label = Text()
director_label.append("🎯 ", style="bold red")
director_label.append(self.director_name, style="bold white")
director_label.append(
f" [{self.director_model_name}]", style="dim cyan"
)
tree = Tree(director_label, guide_style="bold red")
# Add each worker agent as a branch
for agent in self.agents:
agent_label = Text()
# Get agent name
if hasattr(agent, "agent_name"):
agent_name = agent.agent_name
elif hasattr(agent, "name"):
agent_name = agent.name
else:
agent_name = f"Agent_{self.agents.index(agent)}"
# Get agent model if available
model_info = ""
if hasattr(agent, "model_name"):
model_info = f" [{agent.model_name}]"
elif hasattr(agent, "llm") and hasattr(
agent.llm, "model"
):
model_info = f" [{agent.llm.model}]"
# Get agent description if available
description = ""
if hasattr(agent, "agent_description"):
description = f" - {agent.agent_description[:50]}"
elif hasattr(agent, "description"):
description = f" - {agent.description[:50]}"
agent_label.append("🤖 ", style="bold cyan")
agent_label.append(agent_name, style="bold cyan")
if model_info:
agent_label.append(model_info, style="dim cyan")
if description:
agent_label.append(description, style="dim white")
# Add agent as a branch
tree.add(agent_label)
# Create a panel with the tree
panel = Panel(
tree,
title=f"[bold white]HierarchicalSwarm Hierarchy: {self.name}[/bold white]",
border_style="red",
padding=(1, 2),
)
console.print(panel)
def prepare_worker_agents(self):
for agent in self.agents:
prompt = (

@ -60,7 +60,9 @@ def test_agent_building():
agent = agents[0]
# Create agent from spec
agents = swarm.create_agents_from_specs({"agents": [agent_spec]})
agents = swarm.create_agents_from_specs(
{"agents": [agent_spec]}
)
agent = agents[0]
print("✓ Built agent with configuration:")

Loading…
Cancel
Save