Skip to content

SwarmKit

The open-source AI platform runtime.

Define agents, tools and governance as data, not code. SwarmKit runs them under real gates, records every step, and grows them — from a single agent to a multi-agent swarm — through a portal, a CLI and an HTTP API that ship together.

11 open artifact schemas
5 skill backings — MCP, prompt, command, composed, agent
12 bundled model providers, declared in YAML
7,000+ MCP servers wire in as config
~4,000 tests in CI

A swarm is a file

Ten agents, three leaders, tools, a human gate on deployment — and no Python. Change the structure and you edit configuration, not code. Every artifact is open YAML any conformant runtime can run, and the portal edits the same file you would.

The runtime compiles it to a LangGraph StateGraph, starts the MCP servers it needs, enforces the governance you declared, and hands you a run you can replay.

Level 1: Hello World →

# A complete code review swarm.
apiVersion: swarmkit/v1
kind: Topology
metadata:
  name: code-review
agents:
  root:
    id: supervisor
    archetype: supervisor-leader
    children:
      - id: engineering-leader
        archetype: engineering-leader
        children:
          - id: code-reviewer
            archetype: code-analyst
            skills: [code-quality-review, security-scan]
          - id: github-reader
            archetype: github-reader
            skills: [github-pr-read]
      - id: qa-leader
        archetype: qa-leader
        children:
          - id: test-analyst
            archetype: test-analyst
            skills: [test-coverage-review, run-tests]

What you get

The topology canvas

Topologies you can see

Hierarchies, parallel workers, DAG dependencies — drawn from the YAML on the canvas, edited as a form or as the file. Multi-agent →

A five-agent run with its trace

Every run, explained

Which agent fired, what each cost, the span waterfall, the exact prompt a model saw. trace, why, ask, debug from the terminal; the same on the job page. Observability →

The gates inbox

Gates that hold

Decision skills run before an agent sees input and after it answers. A funnel judges the artifact, then two named people approve — quorum enforced by the runtime, not the prompt. Governance →

The append-only audit log

An audit trail nobody can edit

Append-only from the agents' side: verdicts, tool calls with their policy decision, drift scores, gate resolutions — with the reasoning attached. Audit →

Connections: MCP servers and credentials

7,000+ tools, one config block

Any MCP server is a few lines of mcp_servers. Permission tiers, declared effects, sandboxing, credentials by reference — a readonly server cannot write, whatever the model asks. MCP tools →

Governed memory with a fact's timeline

Two memories, one of them curated

Runs remember what they learned. Facts that matter are reconciled on write, quarantined on conflict, and resolved by a person — with the full history of every change. Memory →

A chat with a topology

Chat, API, MCP — same run

swarmkit chat, POST /run, SSE streams, a conversation API, and every topology as a tool for Claude Desktop or Cursor. A chat started in the terminal continues in the browser. Serve →

Canary deployment between two topology versions

Ship a new version safely

Two versions of one topology side by side, traffic split by weight, promotion when the error rate and drift say so — or by hand, or rolled back. Cron and signed webhooks start runs on their own. Triggers & canary →

A skill written by the authoring agent, open in the editor

Grows by conversation

Describe a skill, a topology or a whole workspace; an agent drafts it, validates it against the schema, and writes it only after you say yes. Gaps an agent hits are logged for the next one. Authoring →

Thirty seconds to a running swarm

Install

uv tool install "swarmkit-runtime[ui]" — the CLI and server, with the portal.

Write a workspace

Or let swarmkit init write it from a sentence. A workspace is a directory of YAML.

Run it

swarmkit run . hello --input "…" — or swarmkit serve . and open the portal.

Read what happened

swarmkit trace, why, ask, debug. Then add a gate, a tool, a second agent.

curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install "swarmkit-runtime[ui]"   # [ui] is the portal; without it `swarmkit serve` is API-only
swarmkit init my-swarm            # a conversation; it writes the YAML
swarmkit run my-swarm hello --input "Say hello to the team."
swarmkit serve my-swarm           # the portal at http://127.0.0.1:8000

Watch it

The portal in two minutes — composer, canvas, jobs, gates, audit. Screenshots and the tour →
A funnel in a real delivery workspace: validate, judge, then a multi-party human approval. The SDLC walkthrough →

Learn it in 22 levels

Every level builds on one workspace. Every transcript is a real run, every YAML block is validated and run in CI, every screenshot is the portal on that workspace.

Why not just write the code?

SwarmKit LangGraph (raw) CrewAI Claude Agent SDK
Agent definition YAML topology Python code Python classes Code + config
Multi-agent orchestration Declarative hierarchy + DAG + task plans Manual graph construction Role-based Single agent loop
Tool integration 7,000+ MCP servers via YAML Build or wire yourself Built-in + MCP Built-in harness + MCP
Governance Decision-skill gates, IAM scopes, circuit breakers, funnels DIY None None
Human approval Structural: quorum, roles, defer-and-resume Manual interrupt points None None
Audit trail Append-only, with reasoning DIY None None
Observability Trace, drift, OTel, why/ask, prompt ring buffer DIY Minimal Minimal
Lock-in Open YAML + OSS runtime N/A Python classes Vendor SDK
Models 12 providers, declared as YAML Any Multiple Claude only

You keep LangGraph underneath — checkpointing, streaming, state — without writing its boilerplate, and the runtime records every step.

Built to be read by machines too

Docs are consumed by LLMs as much as by people. /llms.txt is the compact index; /llms-full.txt inlines the whole corpus. swarmkit knowledge-server serves the same corpus to Claude Code or Cursor over MCP, and swarmkit mcp-serve turns any workspace into tools an assistant can call.

The complete playbook → Reference → Design notes →