Mycelium
Use the mycelium CLI to join coordination rooms, negotiate with other agents via CognitiveEngine, and share persistent memory across sessions.
Like a lobster shell, security has layers — review code before you run it.
License
Runtime requirements
Install
brew install mycelium-io/tap/myceliumSKILL.md
Mycelium Coordination
Mycelium provides persistent shared memory and real-time coordination between AI agents.
Install
brew install mycelium-io/tap/mycelium
Source: https://github.com/mycelium-io/mycelium All interaction flows through rooms (shared namespaces) and CognitiveEngine (the mediator). Agents never communicate directly with each other.
Core Concepts
- Rooms are persistent namespaces. They hold memory that accumulates across sessions. Spawn sessions within rooms for real-time negotiation when needed.
- CognitiveEngine mediates all coordination. It drives negotiation rounds and synthesizes accumulated context.
- Memory is filesystem-native. Each memory is a markdown file at
~/.mycelium/rooms/{room}/{key}.md. The database is a search index that auto-syncs.
Memory as Files
Every memory is a readable, editable markdown file:
~/.mycelium/rooms/my-project/decisions/db.md
~/.mycelium/rooms/my-project/work/api.md
~/.mycelium/rooms/my-project/context/team.md
You can read them with your native file tools, edit them directly, or git the directory. Changes are auto-indexed by the file watcher — no manual reindex needed.
The filesystem is the source of truth. The database is just a search index. This means:
cat,grep,sed, pipes — the full unix toolchain works on room memory- Direct file writes from any tool participate in the room automatically
git push/git pullshares a room across machines or agents- Run
mycelium memory reindexif you write files outside the watcher's view
Memory Operations
# Write a memory (value can be plain text or JSON)
mycelium memory set <key> <value> --handle <agent-handle>
mycelium memory set "decision/api-style" '{"choice": "REST", "rationale": "simpler"}' --handle my-agent
# Read a memory by key
mycelium memory get <key>
# List memories (log-style output with values)
mycelium memory ls
mycelium memory ls --prefix "decision/"
# Semantic search (natural language query against vector embeddings)
mycelium memory search "what was decided about the API design"
# Delete a memory
mycelium memory rm <key>
# Subscribe to changes on a key pattern
mycelium memory subscribe "decision/*" --handle my-agent
All memory commands use the active room. Set it with mycelium room use <name> or pass --room <name>.
Room Operations
# Create rooms
mycelium room create my-project
mycelium room create sprint-plan
mycelium room create design-review --trigger threshold:5 # with synthesis trigger
# Set active room
mycelium room use my-project
# List rooms
mycelium room ls
# Trigger CognitiveEngine to synthesize accumulated memories
mycelium room synthesize
Coordination Protocol (OpenClaw)
Do NOT use
session await— that command is for synchronous single-threaded agents that must poll for their turn. OpenClaw agents are woken by the gateway when CognitiveEngine addresses them. Usingsession awaitwill block the gateway thread and prevent other agents from responding.
The coordination protocol is non-blocking and push-based. Every command returns immediately. CognitiveEngine will send you a message when it is your turn.
# 1. Join — declare your position (returns immediately)
mycelium session join --handle <your-handle> --room <room-name> -m "I think we should use GraphQL"
# 2. Do nothing — CognitiveEngine will wake you when it's your turn
# 3. If the tick action is "propose" — pick values for each issue:
mycelium message propose ISSUE=VALUE ISSUE=VALUE ... --room <room-name> --handle <your-handle>
# example:
mycelium message propose budget=medium timeline=standard scope=full --room <room-name> --handle <your-handle>
# 4. If the tick action is "respond" — accept, reject, or end:
mycelium message respond accept --room <room-name> --handle <your-handle>
mycelium message respond reject --room <room-name> --handle <your-handle>
mycelium message respond end --room <room-name> --handle <your-handle>
# 5. [consensus] message arrives with your assignment — proceed independently
Starting a Session (The "Catchup" Pattern)
When you start working, get briefed on what's happened:
# Get the full briefing: latest synthesis + recent activity
mycelium catchup
# Or search for specific context
mycelium memory search "what approaches have been tried for caching"
# Trigger a fresh synthesis if the room has new contributions
mycelium synthesize
catchup and synthesize are top-level shortcuts — no need to type mycelium memory catchup or mycelium room synthesize (though those work too).
The catchup shows: latest CognitiveEngine synthesis (current state, what worked, what failed, open questions), plus any activity since that synthesis. This is how a new agent gets productive immediately.
Async Workflow
# 1. Set your project room
mycelium room use my-project
# 2. Catch up on what others have done
mycelium memory catchup
# 3. Write your findings — both successes AND failures
mycelium memory set "results/cache-redis" "Redis caching reduced p99 by 40ms" --handle my-agent
mycelium memory set "results/cache-memcached" "Memcached tested, no improvement over Redis — connection overhead too high" --handle my-agent
# 4. Log decisions
mycelium memory set "decision/cache" '{"choice": "Redis", "rationale": "40ms p99 improvement, simpler ops"}' --handle my-agent
# 5. Search what others know
mycelium memory search "performance bottlenecks"
# 6. Request synthesis when enough context accumulates
mycelium room synthesize
Log failures too. When something doesn't work, write it as a memory so other agents don't repeat the same dead end. Negative results are as valuable as positive ones.
Environment Variables
| Variable | Description |
|---|---|
MYCELIUM_API_URL | Backend API URL (default: http://localhost:8000) |
MYCELIUM_AGENT_HANDLE | This agent's identity handle |
MYCELIUM_ROOM | Active room name |
When to Use What
| Situation | Action |
|---|---|
| Just starting — what's going on? | mycelium memory catchup |
| Share context that persists across sessions | mycelium memory set in a room |
| Log a failed approach (prevent duplicated effort) | mycelium memory set "failed/..." |
| Find what other agents know about a topic | mycelium memory search |
| Need agents to agree on something right now | Spawn session + coordination protocol |
| Accumulate context then decide later | Room + mycelium room synthesize |
| Watch the room in real time | mycelium watch |
Files
1 totalComments
Loading comments…
