Skip to main content
AITE M1.2-Art29 v1.0 Reviewed 2026-04-06 Open Access
M1.2 The COMPEL Six-Stage Lifecycle
AITF · Foundations

Multi-Agent Patterns: Hierarchical, Market, Swarm, Actor

Multi-Agent Patterns: Hierarchical, Market, Swarm, Actor — Transformation Design & Program Architecture — Advanced depth — COMPEL Body of Knowledge.

9 min read Article 29 of 53

Article 11 compared multi-agent frameworks (LangGraph, CrewAI, AutoGen, Semantic Kernel, OpenAI Agents SDK, LlamaIndex Agents). Article 12 cataloged coordination failures. This article takes the selection decision to the next level: given the framework, which topology? The choice has implications for throughput, determinism, auditability, and Article 14 human-oversight design.

The four topologies at a glance

Topology 1 — Hierarchical (boss + workers)

A hierarchical system has a boss agent that decomposes the task, delegates to worker agents, and reintegrates their outputs. Workers may themselves be bosses for sub-tasks.

When it fits: well-understood task decomposition; workers are specialized (researcher, writer, reviewer); auditability requires a single owner of the plan.

Coordination characteristics: synchronous handoffs are typical; the boss holds the plan and the context; workers return structured outputs.

Failure modes (Article 12): infinite delegation (boss sends work back to itself via a worker), deceptive delegation (worker reports done without executing), context-starvation (worker lacks the context it needs).

Mitigations: delegation-depth cap; completion-verification step on the boss; shared context channel for long-lived context.

Real-world examples:

  • CrewAI role-based hierarchical pattern — public CrewAI docs and demos show the canonical boss + workers pattern (one “manager” and several “specialist” agents).
  • Microsoft AutoGen GroupChat with a Manager agent — public AutoGen examples demonstrate the hierarchical variant.
  • LangGraph supervisor-and-workers pattern — LangGraph’s supervisor pattern implements the same topology with explicit state-graph transitions.

Topology 2 — Market (bidding)

A market topology has a coordinator that posts a task and candidate agents that bid. The coordinator awards execution to the best-fitting bidder, then verifies and “pays” (in credit, reputation, or the next task).

When it fits: heterogeneous worker pool; the best worker depends on the task specifics; the coordinator does not have prior knowledge to delegate optimally.

Coordination characteristics: bid submissions carry declared capability, cost estimate, latency estimate; the coordinator applies a selection rule.

Failure modes: reputation gaming (an agent bids aggressively without capability); winner’s curse (the most optimistic bidder wins and underperforms); starvation of niche-capability agents with nothing to bid on.

Mitigations: track observed performance per agent and discount future bids by recent success rate; run a shadow evaluation on a fraction of tasks; reserve niche-capability agents for tasks that match their declared specialties.

Real-world examples:

  • Contract-net protocol — the academic ancestor of market topologies (R.G. Smith, 1980); the pattern shows up in multi-agent reinforcement-learning papers.
  • OpenAI Agents SDK routing pattern with capability metadata — the SDK supports routing that is effectively a market when candidate agents declare capabilities.
  • LlamaIndex Agents ensemble routing — LlamaIndex ensembles act as bidders when the ensemble routes a query to the agent whose declared scope best matches.

Topology 3 — Swarm (peer-to-peer)

A swarm has peer agents with no central coordinator. Each agent observes shared state, takes local decisions, and broadcasts partial results. Global behavior emerges from local interactions.

When it fits: exploration tasks without a known decomposition; resilience to single-agent failure is primary; the problem has parallel, independent sub-goals.

Coordination characteristics: shared state store (blackboard); message broadcast rather than direct addressing; consensus or quorum rules for aggregation.

Failure modes: oscillation (agents react to each other indefinitely); groupthink (early agents bias later agents through the shared state); emergent harmful behavior that no single agent would produce.

Mitigations: anti-oscillation rules (hysteresis, cool-down); diversity injection (distinct prompts or models across peers); emergent-behavior monitoring (anomaly detection on the aggregate output).

Real-world examples:

  • AutoGen GroupChat without manager — public AutoGen examples of pure peer-to-peer conversation illustrate swarm pros and cons.
  • CrewAI peer-collaboration mode — CrewAI supports crew modes where agents interact peer-to-peer.
  • Research-swarm public demos on arXiv exploration — a pattern where multiple agents propose readings and the swarm converges on relevant papers.

Topology 4 — Actor (message-passing)

An actor topology treats each agent as an actor — a unit of computation with a mailbox, processing messages sequentially, with failure isolation and supervisor trees (Erlang/Akka tradition). Messages are asynchronous; state is local to the actor.

When it fits: long-running agents with state; high concurrency with failure isolation; asynchronous events (webhooks, alerts) drive the agent.

Coordination characteristics: each agent processes one message at a time; messages are queued; supervisors restart failed actors.

Failure modes: message-ordering assumptions violated (the sender assumed FIFO, the implementation is not); slow actor queue buildup (backpressure absent); supervisor cascade failure (supervisors fail simultaneously).

Mitigations: explicit message-ordering semantics documented; backpressure with bounded queues; supervisor-tree design with heterogeneous restart policies.

Real-world examples:

  • Kafka-based actor model for asynchronous agents — public reference architectures use Kafka topics as the mailbox substrate; agents consume from their topic.
  • Semantic Kernel plugin-driven handler pattern — agents written as plugins triggered by events realize an actor pattern over SK.
  • LangGraph with async state-graph plus queue triggers — LangGraph supports async transitions; combined with a queue, it implements actor-like behavior.

Topology selection matrix

The selection is rarely pure; real systems often combine topologies — a hierarchical top level with actor workers, or a market at the routing layer with a hierarchical execution per winner.

Implications for the architect

Observability

Topology shapes observability (Article 15). Hierarchical systems produce a clean tree trace (one root, branches to workers). Market systems produce bid records plus execution traces. Swarms need aggregate-behavior dashboards in addition to per-agent traces. Actor systems need mailbox-depth metrics and supervisor-event logs.

Human oversight

Topology shapes Article 14 human-oversight design.

  • Hierarchical: oversight on the boss’s plan before delegation; review of final reintegration.
  • Market: oversight on the winning-bid decision for high-stakes tasks; verification of the winner’s output.
  • Swarm: oversight on aggregate behavior; kill-switch on emergent-behavior anomaly.
  • Actor: oversight on the supervisor tree and message flows; kill-switch per actor class.

Kill-switch

Topology shapes kill-switch design (Article 9). A hierarchical kill-switch targets the boss. A market kill-switch halts the coordinator. A swarm kill-switch broadcasts halt to all peers. An actor kill-switch directs the supervisor to stop spawning and drain queues.

Cost

Topology shapes cost (Article 19). Hierarchical concentrates cost in the boss’s context window. Market adds bid overhead. Swarm multiplies cost by peer count. Actor spreads cost across queued messages with potential long-running spend.

Framework support for each topology

The six major frameworks support the four topologies unevenly. The architect should understand the default posture of each before committing:

  • LangGraph naturally supports hierarchical (supervisor + workers) and actor (async state-graph with queues) out of the box; market patterns are implementable with custom routing nodes; swarm requires custom aggregation nodes.
  • CrewAI defaults to hierarchical with a manager role; peer-collaboration mode supports swarm-lite patterns; market patterns require custom crew-routing logic.
  • AutoGen supports hierarchical via GroupChat-with-Manager, swarm via GroupChat-without-Manager, and bespoke actor or market patterns via custom conversation programs.
  • OpenAI Agents SDK supports hierarchical via handoffs and can implement a market via capability-based routing; actor support is through event-driven callers.
  • Semantic Kernel supports actor patterns most naturally (plugins triggered by events) and hierarchical via planner plugins; swarm and market are less idiomatic.
  • LlamaIndex Agents emphasises retrieval-anchored flows; supports hierarchical and routing-based market patterns best; swarm is uncommon in its documented examples.

The framework posture is not destiny — any topology is implementable in any framework — but the path of least resistance matters for maintenance and for new-engineer onboarding.

Combining topologies — hybrid patterns

In practice, real agentic systems combine topologies. Three common hybrids:

Hierarchical-over-market. A hierarchical boss assigns tasks to a market layer; the market selects the winning worker. The boss retains auditability; the market exploits heterogeneous worker capability.

Actor-over-hierarchical. Asynchronous events trigger actor agents that internally execute hierarchical plans. The actor pattern handles event-driven triggering; hierarchy handles plan execution.

Swarm-within-hierarchical. A hierarchical boss delegates exploration to a swarm of peer agents, then re-takes control for integration. The swarm handles divergent exploration; the hierarchy provides convergent integration.

Anti-patterns to reject

  • “Let the agents figure out coordination at runtime.” Emergent coordination without design is emergent failure.
  • “We’ll use swarm because it sounds cool.” Swarm is the topology of last resort; use it only when other patterns genuinely fail.
  • “The framework default is our topology.” Frameworks default to what is convenient to demo, not what fits your problem.
  • “No kill-switch per topology.” Kill-switch design is topology-specific; one-size-fits-all fails.

Learning outcomes

  • Explain four multi-agent topologies, their coordination characteristics, and their failure modes.
  • Classify four use cases (document-review pipeline, customer-service routing, research-exploration, long-running alert-response) by best-fit topology.
  • Evaluate a multi-agent design for coordination risk, observability adequacy, and topology-appropriate kill-switch design.
  • Design a topology specification for a given agentic system, including hybrid patterns if applicable and the observability/oversight/kill-switch design that follows.

Further reading

  • Core Stream anchors: EATE-Level-3/M3.3-Art11-Enterprise-Agentic-AI-Platform-Strategy-and-Multi-Agent-Orchestration.md.
  • AITE-ATS siblings: Article 11 (framework comparison), Article 12 (coordination failures), Article 15 (observability), Article 20 (platform).
  • Primary sources: R.G. Smith, “The Contract Net Protocol” (1980); LangGraph, CrewAI, AutoGen, OpenAI Agents SDK, Semantic Kernel, LlamaIndex Agents public documentation; public Kafka-based actor-model patterns for asynchronous agents.