v0.1.0 • Pure Rust

Orchestrate Multi-Agent Swarms in Pure Rust

Route tasks to specialized coding agents and compose them into higher-order workflows like parallel fan-out, structured discussions, and manager synthesis. Dependency-light and local-first.

swarm orchestration
$ swarm fanout "Review the auth module"
[info] Initializing fan-out run... Dispatching to 3 parallel worker agents.
Root Task
User Login
Worker 1 (cli:codex)
Schema & Database
Done
Worker 2 (cli:claude)
JWT Auth Logic
Done
Worker 3 (api:openai)
Login/Register Routes
Done
[info] All workers finished. Manager synthesis written to the session report.
$ swarm discuss "Review the session model"
[info] Initializing debate between Security Auditor and Lead Architect.
Architect

"The design should separate authentication state, revocation, and audit events before implementation."

Security Auditor

"Good. Also call out which parts are runtime policy and which parts belong in storage contracts."

Architect

"The storage contract stays small. The executor can route revocation checks through a configured backend."

Security Auditor

"That gives us a clean implementation plan and a concrete list of follow-up tests."

[info] Consensus reached after 2 rounds. Discussion recorded to sessions. Run complete.
$ swarm metadirector "Plan the next verified slice"
[info] Manager agent spawning implementation and review pipeline...
1 Manager gathers source facts and accepted constraints
2 Workers return bounded architecture, implementation, and review notes
3 Manager rejects unsupported claims and keeps risky changes behind verification
4 The next slice is scoped to files, commands, risks, and stop conditions
5 Session artifacts remain inspectable through CLI and MCP surfaces
[info] Manager packet ready. Run complete.

Designed for Complex Agent Coordination

Single-agent tasks have limits. Swarm coordinates diverse coding models through explicit roles, session records, and manager synthesis.

Pattern 01

Parallel Fan-Out

Sends the same task to independent workers, then gives their outputs to a manager for synthesis. Useful for architecture, implementation, and review perspectives.

Pattern 02

Structured Discuss

Configures multiple roles to reason through a problem over one or more rounds. The session produces inspectable transcripts and digest artifacts.

Pattern 03

Manager Synthesis

Uses a manager agent to compare worker outputs, separate accepted facts from risky claims, and return a compact decision packet.

Engine Features

Descriptor-First Backends

Wired directly in configuration, not in source code. Any local shell command or HTTP client can be declared as an agent backend using simple TOML.

Native In-Process Harness

Includes `swarm-manager`, providing an embedded agent loop, API provider registry, and credential vault for running models natively without heavy processes.

Secure Credential Storage

Provider keys can be encrypted at rest through the OS keyring, with environment-variable fallback for systems without keyring support.

MCP Server Layer

Exposes reports, manifests, sessions, events, transcripts, and dispatch surfaces through the MCP crate.

Modular Crate Architecture

Swarm keeps wire contracts, storage, routing, execution, transport, and native agent concerns in separate crates.

Stable Wire Types

swarm-contracts

Events, jobs, telemetry (serde only)

Substrate

swarm-core

Pure repo-trait substrate

Stateless leaf modules

swarm-kernel

Resolvers, classifiers, backend ABI

The Engine

swarm-exec

Orchestration, sessions, executor

Interface

swarm-cli

CLI command dispatch

Server Protocol

swarm-mcp

MCP server layer & registry

Harness

swarm-manager

Providers, credentials, agent loop

Hover a crate to inspect

Swarm splits operations into 9 distinct workspace crates. The default build is dependency-light: no async runtime, no HTTP, and no TLS by default. Select any crate node in the diagram to inspect its exact role in the system.

Quickstart

Get your swarm up and running in minutes. Install the CLI, configure your agent descriptors, and launch your first run.

01

Compile the Workspace

Clone the repository and build the engine using Cargo. The default build avoids async, HTTP, and TLS dependencies.

cargo build --release
cargo test
02

Configure Your Backends

Declare your agent execution endpoints by copying the example configuration into your local config file:

mkdir -p ~/.swarm
cp examples/config.example.toml ~/.swarm/config.toml
03

Define Backend Descriptors

Open ~/.swarm/config.toml and specify how your local CLIs should run. No Rust coding required to add custom agents:

# ~/.swarm/config.toml
[backend.claude]
kind    = "cli"
command = "claude"
args    = ["--print", "--model", "{model}"]
prompt  = "stdin"
ready_check = { binary = "claude" }

[settings]
default_agent = "claude"
04

Run the Engine

Orchestrate runs from the command line. Launch a multi-round discussion with explicit participants:

cargo run -p swarm-cli -- discuss \
  --participant architecture=claude:sonnet \
  --participant review=codex \
  "Analyze auth.rs for timing vulnerabilities"

Workspace Feature Flags

Feature Crate Description
openai swarm-exec Adds OpenAI-compatible HTTP backend using ureq + rustls.
native swarm-exec Enables in-process agent execution loops via swarm-manager.
runtime / http swarm-manager Equips the agent manager with HTTP API clients (reqwest + rustls).
registry swarm-mcp Allows service self-registration with JSON registries.
rmcp swarm-mcp Enables the rmcp-based MCP transport.

Threat Model & Safety Boundaries

Swarm is an orchestrator, not a sandbox. Operators should understand how backend processes, prompts, and credentials behave before deploying it.

01

Arbitrary Subprocesses

The cli backend descriptor runs arbitrary commands exactly as declared. It inherits the host environment and executes with your user's exact privileges. Treat your config.toml with the same security classification as your shell profile.

02

Prompt & Code Leakage

When using network-based API endpoints, tasks, prompts, file contents, and workspace context may leave your local system and go to the configured provider.

03

No Permission Broker

Swarm provides no internal sandbox or permission broker in v1. Backend subprocesses run with their own local filesystem and network permissions.

04

Credential Vault Boundaries

swarm-manager can encrypt credentials at rest, but subprocess backends can still read whatever their process permissions allow. Vet external CLI wrappers.

Ready to build your agent network?

Clone swarm, review the safety model, and start composing reliable multi-agent workflows.