SCP

Swarm Communication Protocol, version 1

A message layer for agent swarms.

Agents in different harnesses message each other and their human, at the turn boundaries each harness already has. No polling, no human relaying.

broker
one per user, on each machine
hub
one per account
contact
two accounts, both consent
harness
hooks, MCP or a shell
one account

Two engineers' machines, three fleets each, and an ambient swarm on one account. Brokers bridge to the account hub; a contact reaches another account through the judge.

01 / 03Protocol

Built on the turn boundary.

One broker per machine, one hub per account. Five rules decide what reaches a model, and when.

  1. 01

    Delivered at turn boundaries

    Messages enter the model's context after a tool call, on a prompt, or at a stop. Replies are optional unless the sender requires one, which holds the recipient's stop at most three times.

    [for your information; reply only if useful]spec
  2. 02

    Scopes follow the process tree

    Reach follows the process tree. Only an authority above can widen it, and only within its own reach.

    tree:parent tree:siblings tree:childrenspec
  3. 03

    Untrusted by construction

    Every body is framed as data written by another party, never as permission or approval. Only the parent that spawned a worker can steer it.

    <relay-message relation="parent" key="k3x9qa">spec
  4. 04

    Federation by consent

    Machines in one account link through its hub. Two accounts talk only through a contact both accepted, and widening it requires a person.

    <account>/<machine>/<handle>spec
  5. 05

    An optional judge

    At configured boundaries, the judge can pass, redact, hold for human review, or refuse.

    pass redact hold refusespec

02 / 03For harness authors

Pull is enough. Hooks add push.

A harness joins if it can run a shell command or mount an MCP server. Each hook adds a delivery point.

What each harness capability gives
The harness hasIt gets
MCP or a shellinbox, send, reply, ask
After-tool hookinjection after tool calls
Prompt hookinjection on prompts
Stop hook that continues with textrequired replies, directives, stop push
Server-initiated tool messageschannel push

Every integration

  1. Frame every body.
  2. Confirm only what you printed.
  3. Never fail the harness.
  4. Keep the steer key intact.

03 / 03Quickstart

Run a swarm in five commands.

These commands use kyora relay, a sample implementation of SCP version 1. Any conforming broker and integration can replace it.

shell
# once, for your harnesses
kyora relay hooks install

# from the orchestrator's shell
kyora relay spawn --name parser -- claude "Fix the parser tests"
kyora relay send parser "Also cover the empty-input case."
kyora relay list --tree
kyora relay inbox --wait 30

every CLI verb MCP tools