Profile
Back to NewsBack
GitHub Trending 12 min
Reader Mode
mycelium-io/mycelium: Multi-agent coordination + persistent memory, semantic negotiation, async rooms, and a shared knowledge graph

mycelium-io/mycelium: Multi-agent coordination + persistent memory, semantic negotiation, async rooms, and a shared knowledge graph

4 hours ago

mycelium

mycelium

CI status GitHub release Apache 2.0 License

A shared workspace for humans and agents: one board for the work, persistent memory, and mediated negotiation when agents disagree.


https://github.com/user-attachments/assets/503f21ee-e26c-42f9-b7f3-6d72ab4877cf

install → coordinate → converge → work.


The Problem

Very little exists for agents operating as autonomous peers on a shared mission. To get reliable results, practitioners reach for an orchestrator, a predefined workflow, or a tightly defined handoff structure. Users attempting peer agent coordination have to manually construct scaffolding for memory sharing and context passing. And even then, without coordination infrastructure, the result is AI theater: agents that talk over each other, repeat work already done, fail to recognize disagreement, and fail to negotiate trade-offs.

Who Mycelium Is For

Mycelium is built for autonomous agents operating as peers, with no predefined workflow, no centralized supervisor, and no hierarchy. That includes agents like Claude Code: given a mission and a tool allowlist, left to plan and execute without step-by-step human approval.

Alignment pays off at 3+ agents. At three it improves decision quality over uncoordinated approaches; at four or more it's often the difference between converging on a shared answer and not converging at all.

If your system has a central orchestrator routing tasks to worker agents, you probably don't need Mycelium: your orchestrator is already the coordination layer. Mycelium is for the case where there is no orchestrator, and you don't want one.

Does It Work

Mycelium was evaluated across 14 decision scenarios in a controlled A/B study. See Evaluation Results for the full findings.

What Mycelium Does

Mycelium gives humans and agents one place to work together. A room is that place: it holds the team's shared memory, its channel, and its board.

The board is where the work goes. One row is one task: a markdown document with a body and fields, plus its own thread for the conversation about it. Opening a task shows it over that conversation, the way an issue shows its description over its comments. You add a task and say what you want; the agents work out how. They claim tasks, split them into smaller ones, hand pieces to each other, and talk each one through inside its own thread. The room's channel is its timeline: a line each time a task is filed, claimed, handed back or resolved, not the argument itself, so you can follow six agents without reading everything they say.

When agents genuinely disagree about a trade-off with several moving parts, one of them puts the aligner on that task: a mediator that gives every agent a voice and drives them to one shared answer. That is one thing that can happen inside a piece of work, not how work starts.

Two surfaces, one room, built for each other. You and your agents coordinate together:

  • You work in the UI: create a room, add agents, hand them a mission, and watch them reach a shared decision and pick up the work, live.
  • Your agents work through the CLI: they join the room, negotiate, and write to shared memory on their own (that's what the mycelium skill teaches them).
That's also why you need at least one agent runtime (Claude Code): the agents aren't an optional add-on, they're half the system.
# Put work on the board. It arrives with its own thread.
mycelium board new "Ship passkey login"

An agent takes it and splits it up

mycelium board claim work/ship-passkey-login --to @scout mycelium board new "Pick token storage" --parent work/ship-passkey-login --assign @sec

The argument happens inside the task, not in your channel

mycelium board send work/pick-token-storage "@sec keychain, or WebCrypto?" mycelium board messages work/pick-token-storage

Still not converging? Put the mediator on that task

mycelium board coordinate work/pick-token-storage aligner "converge on token storage"

mycelium board # what needs you, who has what, what the tools say

How It Works

1. The board. Work is a task: one board row, and one thread, minted together and never shared with another row. A task is markdown, so its body is prose you can edit in place and its fields say what stage it is at, who it is for (assignee) and, separately, whether anyone is actually on it right now (custody, a lease that drains if nobody renews it, so a board full of dead agents reads empty instead of reading busy). Tasks are created board-first, decomposed into child tasks, claimed and released between agents, and resolved. Everything said about a task is said inside it, and the room's channel carries a line each time one is filed, claimed, handed back or resolved. That is what lets several agents work at once without a human reading the whole feed.

2. Alignment. When agents disagree on a multi-issue trade-off, one of them puts the aligner on the task: a first-party mediator running a real NEGMAS Stacked Alternating Offers negotiation. It discovers the issues from the agents' positions, brokers each round, addresses one agent at a time, interprets each reply, and stops the instant the agents agree. Every agent has a voice, and the result is one shared answer rather than parallel outputs a human has to reconcile. An agreement can refine the task it ran in and add new tasks to the board. What it never does is decide that task's fate: converging does not resolve it and failing does not take it off its holder. The negotiation decides what; the rows are how the team carries it out.

3. Room Memory. A room's memory is one store, held by the hub. Any agent reads and writes it with mycelium memory set / get / ls / search — from any machine, with nothing to sync and no copy to drift. Memories accumulate across agents and turns, and are searchable by meaning via an embedding index that runs on the hub, with no external service and no database.

4. Peer Collaboration Environment. Any agent joining a room reads that memory and instantly inherits everything the swarm has learned: decisions made, what failed, open questions, the work still open. No repeated context-setting. Intelligence compounds instead of resetting.

Quick Start

There are two ways to install Mycelium.

On a Mac: the app (recommended)

Download Mycelium for Mac (Apple silicon, macOS 13+). Drag it into Applications and open it. It runs a hub on your Mac, or joins your team's, with no Docker and no terminal, and starts your coding agents in herdr when you ask. It updates itself when a new release is out.

Mycelium for Mac, first screen

More in The Mac App.

On Linux, a server, or from a terminal: the CLI

You'll need Docker, an LLM API key (agents can't negotiate without one), and at least one agent runtime (Claude Code).

Onboard your agent. The fastest setup is to let an agent do it. Paste this prompt into Claude Code (or any agent runtime with a shell):

Use curl to read https://mycelium-io.github.io/mycelium/agents.md and perform the setup to install Mycelium

The agent follows agents.md, a setup runbook written for agents: it installs the CLI, brings up the stack, and connects its own runtime as an adapter.

Or install by hand:

# 1. Install the CLI and bring up the stack
curl -fsSL https://mycelium-io.github.io/mycelium/install.sh | bash
mycelium install      # pulls images, prompts for your LLM key, writes ~/.mycelium/config.toml

2. Open the app: this is where you work

mycelium ui open

From the UI you:

  1. create a room (a shared space for agents, memory, and the work),
  2. add agents to it (one per role),
  3. put work on the board: say what you want, not how to do it,
  4. watch them pick it up and work it, live. The room's timeline tells you each time a task is filed, claimed, handed back or resolved; the argument stays in the task.
Your agents drive that same room from the CLI on their own, waiting for their turn, responding, and writing to shared memory (that's what the mycelium skill teaches them). You don't run those by hand; they do.

Prefer to script the human side too? Every UI action has a CLI equivalent:

mycelium room create my-project && mycelium room use my-project
mycelium agent create planner --adapter claude-code --description "Sprint planner"
mycelium board new "Plan the Q3 migration"    # a task, with its own thread
mycelium engine create aligner --kind aligner --room my-project
mycelium board coordinate work/plan-the-q3-migration aligner "converge on the plan"
mycelium board        # what needs you, and who has each row

Architecture

The hub holds the memory; everything else is a thin client. On the hub, rooms are folders and memories are markdown files with YAML frontmatter at ~/.mycelium/rooms/{room}/{key}.md — the source of truth, with search running against a local embedding index (~384-dim, on-device), no external vector service and no database. Every other machine keeps no replica: mycelium memory resolves against the hub over HTTP, so a read always reflects what the room actually says. (Operating the hub, direct file writes still work; run mycelium memory reindex to refresh the index after bypassing the CLI.)

One SLIM node coordinates the room. Agents coordinate over an AGNTCY SLIM group channel per room: MLS-encrypted, with the node forwarding only ciphertext. An always-on thin FastAPI backend is each room's moderator; the agents (and you, by proxy) are members. There's no database, no message broker, no separate realtime service.

Identity is a ladder, and it starts off. Out of the box the channel key derives from a shared secret every host in the mesh sets alike — enough for a laptop or a trusted LAN, with no per-member identity. From there slim.identity climbs one rung: SignerJwt gives each member its own self-signed credential with no extra infrastructure, making members cryptographically distinct participants rather than holders of one shared key. Separately, an HTTP API JWT gate can be turned on for the backend. All of it is off by default, so the try-it path is never blocked by auth — and turning it on, rather than building it, is what's left before a hosted or multi-user deployment (revocation is the open piece).

Participation is a CLI primitive. Any already-awake caller joins a room and coordinates with two stateless calls: mycelium await long-polls until a message is addressed to its handle (the backend holds membership via a presence lease and a durable transcript cursor, so a tick is never missed between turns), and mycelium respond posts a reply or position. An agent participates as a resident runtime — your own live Claude Code session — kept woken with mycelium await --loop --exec , which loops await → reason → respond. The loop is the wake: there's no daemon and no cold-spawn, so the session keeps its context between turns instead of starting over each time.

Sharing is the live channel. Two machines share a room by sharing the fabric: one runs mycelium hub host, the other runs mycelium connect, and both talk to the same room channel and the same memory store. Git can version or back up the hub's ~/.mycelium/ files, but it is not the sharing path — no room flow pushes or pulls over git. For a point-in-time copy, mycelium room clone --from takes an HTTP snapshot.

Every conversation is scoped, and recorded. A task's thread and a mediated negotiation are both tagged, membership-scoped slices of the room's own channel rather than separate channels. Every board row gets its own, minted when the row is created. A negotiation is recorded to the room's memory at log/episodes/{id}.md, causally linked from opening positions to outcome and surfaced live in the UI protocol inspector. Agents can state confidence, cite evidence, and flag deference on replies, so a consensus carries measurable quality: how sure the team was, how many were actually persuaded, and a single trust number combining the two. All of it is optional and agents never speak a protocol; they answer in prose.

Deployment modes. By default everything runs on a single device (your laptop): backend, SLIM node, agents, and CLI all on localhost. That's the primary target and what mycelium install sets up out of the box. For small teams that want to share memory and coordination state, Mycelium supports a hub-and-spoke mode: one machine runs mycelium hub host to stand up the SLIM node and prints its address; teammates run mycelium connect http://: to point their CLI + agents at it. mycelium doctor auto-detects which mode you're in.

Room folders use standard namespaces:

~/.mycelium/rooms/{room}/
├── work/         One row per task, each also a thread on the room's channel
├── decisions/    Why choices were made
├── status/       Current state of things
├── context/      Background & constraints
├── procedures/   How-to guides and runbooks
└── log/          Events, observations, and episode records

Repo layout:

.mycelium/            Memory storage (rooms are folders, memories are markdown files)
mycelium-cli/         CLI + adapters
fastapi-backend/      FastAPI moderator + engines (aligner, synthesizer, hello, persona, conductor)
mycelium-client/      Generated typed OpenAPI client
mycelium-frontend/    Next.js UI
contracts/            Frozen JSON contracts shared across components
docs/                 Docs site + design notes

Each component directory carries its own README covering what lives inside it and the boundaries worth knowing before changing anything there.

Adapters

Mycelium reaches your agents through per-runtime adapters. An adapter doesn't run your agent — it teaches the runtime you already use how to participate in a room. Support is honest about maturity:

| Adapter | Status | |---|---| | claude_code | ✅ proven | | cursor | ⚠️ untested / unverified |

Claude Code. Installs the mycelium skill (~/.claude/skills/mycelium/SKILL.md), giving Claude Code memory and coordination commands via /mycelium. This is the proven path.

mycelium adapter add claude-code

Cursor. Ships its assets per-agent rather than host-wide: mycelium agent create --adapter cursor --cwd drops a Cursor rule and an AGENTS.md section into that workspace, which cursor-agent reads on every session there.

Development

cd fastapi-backend
uv sync --group dev
uv run pytest tests/ -x -q
uv run ruff check . && uv run ruff format . && uv run ty check .

Interactive API docs at http://localhost:8000/docs when the backend is running.

Built On

Mycelium builds on OSS projects we found invaluable in this space:

  • AGNTCY SLIM: the encrypted group-messaging transport agents coordinate over
  • IOC Layer 9: the epistemic envelope layer that rides SLIM
  • NegMAS: multi-issue negotiation, the aligner's engine
  • FastAPI + fastembed: the moderator backend and on-device embeddings
  • Ask DeepWiki</a>
Chat with me