Skip to main content
Swarms provides a comprehensive suite of multi-agent architectures for orchestrating complex workflows. Each architecture is designed for specific use cases and collaboration patterns. The architectures below are the ones with a full guide on this site. For every orchestration class and function shipped in the library — including the ones that only have an API reference page — see the Multi-Agent Structures Catalog.

Quick Comparison

Consensus and Evaluation

These reach a decision rather than producing a pipeline result. Each has an API reference page.

Planning and Delegation

Distribution and Batching

Architecture Categories

Linear Architectures

These architectures execute tasks in a straightforward manner:
  • Sequential Workflow: Agents execute in order (A → B → C)
  • Concurrent Workflow: Agents execute simultaneously on the same task

Dynamic Architectures

These provide flexible orchestration patterns:
  • Agent Rearrange: Define custom flows with and , operators
  • Swarm Router: Dynamically select and execute any swarm type
  • Social Algorithms: Upload arbitrary communication patterns

Hierarchical Architectures

These implement structured command patterns:
  • Hierarchical Swarm: Director decomposes the task and issues orders to workers
  • Heavy Swarm: A question agent generates role-specific questions for a fixed specialist roster

Collaborative Architectures

These enable agent interaction and synthesis:
  • Mixture of Agents: Parallel experts with aggregation
  • Group Chat: Conversational multi-agent interaction
  • Graph Workflow: DAG-based complex workflows

Roster Construction

These do not execute anything themselves — they produce the agents that the architectures above run:
  • Auto Agent Builder: Generates an agent roster (name, description, system prompt, model) from a task, leaving the architecture choice to you
  • Auto Swarm Builder: Generates the roster and selects the swarm_type, optionally executing it
Because a generated roster is just a list of agents, it drops into any architecture on this page.

One Interface, Any Architecture

SwarmRouter wraps most of the architectures above behind a single swarm_type string, so you can swap strategies without rewriting orchestration code.
The 14 values that resolve to a real architecture:
Neither "auto" nor "BatchedGridWorkflow" is a valid SwarmType any more — both were removed from the SwarmType Literal, so passing either now raises SwarmRouterConfigError at construction rather than failing later at run(). BatchedGridWorkflow is a standalone class (its run() takes tasks: List[str], not a single task) and was never actually routable through SwarmRouter. "AutoSwarmBuilder" is likewise not a valid SwarmType and fails at construction. To have the framework choose for you, instantiate AutoSwarmBuilder directly instead of routing through SwarmRouter.
The literal is "RoundRobin", not "RoundRobinSwarm" — the class name and the router key differ.

Shared Context Behavior

Every architecture that runs several agents against one shared conversation now handles context the same way, which changes what your agents actually see.
Handing an agent the whole shared conversation on each invocation puts that history into the agent’s own memory, so the next invocation sends it again on top of what the agent already holds — context grows exponentially across loops, and the agent sees its own output twice, the second time mislabelled as something the user said.Structures now track a per-agent cursor and send only the messages that agent has not been given yet, with the agent’s own messages excluded. When there is nothing new, the agent is told to continue from its own previous response rather than receiving an empty instruction.
Agent.run honours the agent’s output_type, which defaults to "str-all-except-first" — the agent’s entire conversation, not its answer. Writing that into the shared conversation re-injects everything the agent was given, which every later agent then reads.Structures now record the agent’s final message instead. This is why a SequentialWorkflow result reads as a clean handoff chain rather than a compounding transcript.
Conversation no longer auto-loads a shared default-named file into every swarm, so two unrelated swarms running on the same machine cannot bleed history into each other.
The practical effect is that context grows linearly instead of exponentially. If you previously worked around runaway context by capping max_loops, you can raise that cap again.

Choosing the Right Architecture

1

Identify Your Pattern

Determine if your task needs sequential, parallel, or mixed execution
2

Consider Complexity

Match architecture complexity to task requirements
3

Evaluate Features

Review specific features like feedback loops, aggregation, or dynamic routing
4

Test and Iterate

Start simple and upgrade to more complex architectures as needed

Architecture Selection Guide

Use Sequential Workflow When:

  • Tasks have clear sequential dependencies
  • Each step builds on previous output
  • Simple linear processing is sufficient

Use Concurrent Workflow When:

  • Tasks can run in parallel
  • High throughput is needed
  • Multiple perspectives on same input

Use Agent Rearrange When:

  • Need custom flow patterns
  • Mix of sequential and parallel execution
  • Dynamic routing requirements

Use Mixture of Agents When:

  • Multiple expert perspectives needed
  • Quality through collaboration
  • Synthesis of diverse outputs

Use Swarm Router When:

  • Need flexibility to switch strategies
  • Testing multiple architectures
  • Unified interface for all swarms

Use Hierarchical Swarm When:

  • Complex project coordination
  • Specialized worker agents
  • Feedback and refinement needed

Use Heavy Swarm When:

  • Comprehensive research required
  • Multiple analysis phases
  • Thorough investigation needed

Use Group Chat When:

  • Debate and discussion beneficial
  • Conversational problem-solving
  • Multi-perspective reasoning

Use Graph Workflow When:

  • Complex task dependencies
  • DAG structure required
  • Parallel branches with convergence

Use Social Algorithms When:

  • Custom communication patterns
  • Arbitrary agent interactions
  • Flexible orchestration needed

Use a Consensus Architecture When:

  • The output is a decision rather than a document
  • You want noise reduction across independent answers
  • The result should be defensible, with the reasoning recorded

Next Steps

Explore each architecture in detail:

Structures Catalog

Every orchestration class and function in the library

Auto Agent Builder

Generate the agent roster from a task

Sequential Workflow

Linear agent execution

Concurrent Workflow

Parallel agent processing

Agent Rearrange

Custom flow patterns

Swarm Router

One interface for every architecture