Swarm Engine
The Swarm Engine orchestrates multi-agent collaboration on complex tasks. Instead of a single agent working alone, swarms coordinate teams of agents with different specialties to produce higher-quality outputs through structured collaboration patterns.
What is the Swarm Engine?
The Swarm Engine (Engine #22 in the BOSS architecture) is the orchestration layer that manages multi-agent projects. When a task is too complex for a single agent -- requiring research, analysis, creation, review, and communication -- the Swarm Engine coordinates a team of agents to work together on a shared objective.
Every swarm has an objective, a set of participating agents, a collaboration pattern, a budget, and defined deliverables. The Swarm Engine manages the flow of information between agents, tracks progress, enforces budget limits, and produces the final consolidated output.
Swarms are different from simple agent chaining. In a chain, Agent A finishes before Agent B starts. In a swarm, agents can work in parallel, debate each other, vote on decisions, and iteratively refine each other's outputs. The pattern determines the collaboration structure.
6 swarm patterns
Choose the collaboration pattern that best fits your task. Each pattern defines how agents interact, when they hand off work, and how the final output is assembled.
Sequential
Pipeline patternAgents work one after another in a defined order. Each agent receives the output of the previous agent as input. Best for workflows with clear stages where later work depends on earlier results.
Maven (research) → Atlas (plan) → Forge (write) → Reed (review)
Best for: Content creation, report generation, proposal writing
Parallel
Fan-out / fan-in patternMultiple agents work simultaneously on different subtasks. Results are collected and merged by a coordinator (usually Ori or Atlas). Best when subtasks are independent and you want speed.
Ori (split) → [Maven, Nova, Forge] (parallel) → Atlas (merge)
Best for: Multi-market research, competitive analysis, data gathering
Debate
Adversarial reasoningTwo or more agents take opposing positions and argue for their viewpoint across multiple rounds. A moderator agent synthesizes the arguments and produces a balanced recommendation. Debate forces deeper analysis and surfaces risks that a single agent might miss.
Round 1: Cipher (build) vs Nova (buy) → Atlas (synthesize)
Round 2: Cipher (rebut) vs Nova (rebut) → Atlas (synthesize)
Round 3: Atlas (final recommendation with pros/cons)
Best for: Build vs buy decisions, strategy selection, risk assessment
Consensus
Voting patternAll agents independently produce their answer to the same question, then vote on the best approach. The majority opinion wins, but dissenting views are documented. This reduces individual agent bias and produces more reliable answers for factual questions.
[Maven, Atlas, Nova, Cipher] (independent) → Vote → Majority + dissents
Best for: Fact verification, quality assessment, code review
Hierarchical
Manager + team patternA leader agent decomposes the objective into subtasks, assigns them to team agents, reviews their outputs, requests revisions, and assembles the final deliverable. The leader has authority to accept, reject, or redirect work. Most similar to how human project teams operate.
Atlas (leader) → assigns [Maven, Forge, Nova, Reed] → reviews → assembles
Best for: Complex projects, GTM plans, business cases, audit prep
Code Swarm
Autonomous development pipelineA specialized swarm pattern for software development. Similar to Devin-like autonomous coding, but with multi-agent review and safety gates. The pipeline flows through architecture, implementation, security review, testing, and documentation.
Blueprint (architecture) → Cipher (implement) → Sentinel (security) → Gauge (test) → Reed (docs)
Each stage produces artifacts that feed into the next. The Guardian governance agent reviews security-sensitive code before any deployment. Failed tests loop back to Cipher for fixes.
Best for: Feature implementation, bug fixes, refactoring, API development
Creating a swarm project
Swarms can be created from the studio UI (click "New Swarm" in any studio) or via the API. Every swarm requires an objective, a pattern, participating agents, and a budget.
Here is an example of a debate swarm for a build-vs-buy decision:
The debate room
Debate swarms have a dedicated UI called the Debate Room. It displays the arguments from each side in real-time, round by round, with the moderator's synthesis after each round. You can observe the debate as it happens and interject with clarifications or constraints at any point.
Debate Room features:
Budget gates
Every swarm has a budget that controls how much it can spend on AI model tokens. The budget is enforced by the Budget governance agent in the Service Engine. Three tiers of approval gates prevent runaway costs:
Swarms under $50 total estimated cost run automatically. The Budget agent monitors spending in real-time and pauses execution if the estimate is exceeded by more than 20%.
Swarms between $50 and $500 require a human to approve the budget before execution begins. The swarm presents its plan, estimated cost breakdown by agent, and expected deliverables. A studio admin or org admin must approve.
Swarms over $500 require approval from multiple stakeholders. The request goes to the organization's approval chain (configurable in admin settings). This gate prevents accidental expensive operations.
Budget thresholds are configurable. Organization admins can adjust the auto-approve, human-approve, and board-approve thresholds from /admin/settings/budget. The default values ($50 / $500) work well for most organizations.
Code Swarm: autonomous development
The Code Swarm pattern creates a complete software development pipeline with multiple specialist agents. It is the BOSS equivalent of autonomous coding tools like Devin, but with built-in security review, quality gates, and human checkpoints.
Architecture document, database schema, API contract, component diagram
Source code, database migrations, API routes, middleware
OWASP scan results, vulnerability report, remediation suggestions
Unit tests, integration tests, coverage report, regression results
API docs, user guide, changelog entry, inline code comments
Safety gates in Code Swarm:
- -Guardian reviews all code changes before they leave the sandbox
- -Sentinel checks for hardcoded secrets, SQL injection, and XSS vulnerabilities
- -Failed tests loop back to Cipher automatically with the failure report
- -Human checkpoint before any code is committed or deployed
- -All generated code runs in a sandboxed environment, never on production