Concept

What is a multi-agent swarm?

One AI is a tool. A swarm is a team. Here is what the architecture is and why it matters.

The short answer. A multi-agent swarm is a system that decomposes a goal across multiple specialised AI agents — typically a planner, several executors (researcher, writer, coder, critic), and an orchestrator that routes work between them. Each agent has its own role, tools, and sometimes its own underlying model. Swarms outperform single agents on complex, multi-domain tasks because they parallelise work, separate concerns, and let critic agents catch mistakes the executor would have missed.

Why one agent is not always enough

A single agent has one context window, one tool-selection policy, and one voice. For tasks that span domains (research a market, draft a paper, write supporting code, render a slide), one agent has to swap contexts repeatedly and tends to do each piece worse than a specialist would. A swarm gives each step a specialist.

The typical swarm structure

undefined

Where swarms genuinely win

Research synthesis across multiple sources. Software engineering tasks that span design + code + tests. Long-form writing with research, draft and critique cycles. Customer interactions where one agent handles intent, another handles fulfilment, another handles tone. Where they lose is anything fast and atomic — the coordination overhead is not worth it for simple turns.

How Luna runs a swarm

Luna ships with a SwarmOrchestrator and 92+ tools that specialist sub-agents can call. When you give Luna a complex goal, she does not run one big inference — she spins up a research agent, a code agent, and a synthesis agent, lets them work in parallel, and stitches the results together.

The swarm is invisible from the user side. You ask one question. Underneath, a small team works on it.

Run a swarm task with Luna →

Related questions people ask

How many agents are in a typical swarm?

Usually 3-7 active for a task. Beyond that, coordination overhead starts to outweigh benefit. The biggest swarms in production (OpenAI Swarm, AutoGen, Luna's SwarmOrchestrator) cap parallel agents at a small number and reuse them across phases.

Do swarms use one model or multiple models?

It depends. The simplest pattern uses one model with different system prompts ("you are the researcher", "you are the critic"). The strongest pattern routes different roles to different models — a cheap fast model for the planner, a strong reasoning model for the synthesiser. Luna uses tiered routing across roles.

Are swarms more expensive than single agents?

Generally yes per task — you are running more inference. But they also finish more often, with less back-and-forth, on harder tasks. For atomic queries, stick with one agent. For real work, the swarm pays for itself.

What is the difference between MoE and a swarm?

MoE (Mixture of Experts) routes tokens within a single forward pass to different expert sub-networks of one model. A swarm is multiple full models or runs of one model, coordinated at the application level. MoE is an architectural feature; swarms are a system pattern.