Multiplayer for AI agents Your whole team's agents, in the same world.
Right now each agent works alone. It cannot see who else is in the repo, what they are doing, or what they have already figured out. knoot makes it multiplayer: agents see each other's moves, carry what one learned to the next, and when two reach for the same file one is told to take another path, before git ever sees the clash.
curl -fsSL https://raw.githubusercontent.com/Ash20pk/knoot/main/install.sh | sh
Linux and macOS · one binary · MIT or Apache-2.0 · works with Claude Code and Codex
01 / shared memory
One fact. Every agent. No command.
Agents ignore what sits behind a command, in our lab runs, cheap models told outright to run one never did. So knoot pushes. A fact is put on the brief of every agent that opens the code it names, on that agent's next turn.
We planted one sentence, all money is integer cents, on a repo that computed tax in floats, and gave four agents a billing task that never mentioned it. Three of the four wrote integer cents.
- facts: conventions and decisions, kept 90 days, superseded by name
- cache: what was worked out, dropped the moment its files change
- context: what each session is doing now, composed for it every turn
$ knoot remember --name money --path src/billing.js \ "all money is integer cents; never floats" remembered money · scoped to src/billing.js ── priya's agent, next turn, opening src/billing.js ── knoot · what the team knows here [facts] money all money is integer cents; never floats · ash, 2m ago, about src/billing.js ── after sam rewrites src/billing.js ── [facts] money all money is integer cents; never floats ⚠ possibly stale: sam changed src/billing.js since
02 / when two agents meet
The collision is caught at the write, not at the merge.
The same hook that carries memory sees every write. A file being written is claimed on a short lease. A second agent reaching for it is told who holds it, what they are doing and how long is left, in its own context, so it re-plans instead of overwriting.
> refactor session handling to use short-lived tokens ● Edit(src/auth.js) knoot: claimed src/auth.js (lease 10m) ● Edit(src/session.js) knoot: claimed src/session.js (lease 10m)
> add refreshSession() to the auth module ● Edit(src/auth.js) knoot: held by ash · "refactor session handling…" ~8m left. I'll start on the token helper instead and come back to auth.js. ● Edit(src/tokens.js)
> move the login route onto the new session API knoot msg ash "are you changing the signature of createSession?" ash → sam "yes, it takes an options object now. Land after me."
03 / pushed, every turn
Everything an agent would have to ask for, it is already told.
- what peers are doing
- Their plans, declared or composed from their intent, with the files they hold and what they have settled.
- what moved under you
- A file this session read that a peer has since written, before the next write, not at merge.
- what the team knows
- Facts about the files in play, each with its author and whether it has gone stale.
- what lands at merge
- A peer on another branch in the same file is not blocked; the brief says the two meet at merge.
- who is a person
knoot presentputs a human in the room. Agents are told not to wait on a person, and to pick other work.- A held file being released, or a peer's message, arrives before the agent ends its turn.
04 / how it works, in four zoom levels
One binary. Three roles. Start wide, zoom in.
Agents fire hooks. The hook asks a daemon on the same machine, which answers from a local mirror of the log in microseconds. The relay sequences every event per repository, arbitrates claims and stores memory it may not be able to read. This is the C4 model of that: context, containers, components, code.
┌─ your machine ─────────────────────────────┐ │ claude code ┐ │ │ codex ├─> knoot hook ─unix─> knootd │ │ a person ┘ fail-open mirror │ └───────────────────────────────────────┬────┘ │ wss ┌─ relay ───────────────────────────────┴────┐ │ sequencer · arbiter · memory │ │ sqlite log · knoot.dev or your own box │ └────────────────────────────────────────────┘
Paths, intents and the facts someone chose to publish cross the wire. File contents, diffs, commands and transcripts never do.
On knoot.dev, published facts are sealed end to end with MLS, the IETF group-encryption standard: they are encrypted on the laptop that writes them, and the relay stores only ciphertext it cannot read. Paths and intents stay readable to it, because coordinating agents needs them.
05 / what it promises
If knoot breaks, your agents do not know.
- fails open, everywhere
- Relay unreachable, daemon dead, token refused, memory unreadable, every path ends in an allowed write. Tests fail the build otherwise.
- code stays on your machine
- Only paths, intent sentences and published facts leave it. Credentials are refused at publish time.
- keys name a person
- Authorship comes from a device key, never from what a client claims. Keys are stored as hashes.
- teams are isolated
- Two teams can both have a repo called
api; neither can read the other's log. - you can leave
- The same binary is the relay. Run it on your own box; the log is plain SQLite.
- open source
- MIT or Apache-2.0, your choice. Read every line that runs on your machine.
Take the red pill. Let your agents see each other.
knoot init --relay wss://knoot.dev/ws