Back to Discover

marrow

connector

aryawidjaja

Shared memory for parallel AI coding agents. Local, free, with rooms and file claims.

View on GitHub
0 starsSynced Aug 7, 2026

Install to Claude Code

/plugin marketplace add aryawidjaja/marrow

README

Marrow and Spinal Cloud

marrow

One hive mind for your AI coding agents.

Release License Website Built with Rust Stars

MCP Claude Code Cursor Codex

What one agent learns, every agent already knows

What one of your agents figures out at 2am, every other one already knows the next time it's asked. Nobody relays it by hand, nobody re-explains it. That's not how AI agents normally work: run more than one today and each starts blind, no idea what an earlier session already worked out, no idea another agent is touching the same file right now.

Marrow fixes that. One hive: what one agent learns, every other already has.

  • A new session already has what the last one learned. No re-explaining what you already covered.
  • An agent doesn't have to ask if another one is already on this file, it already knows, before it touches anything.
  • It extends across every project on your machine. Carrying it to a team's different devices is Spinal Cloud, built on top.
  • Nothing here is a black box. Every memory lives in a file you can open, read, edit, or delete.

Marrow is built for work that takes more than one agent, or more than one session.

Marrow itself stays free forever, AGPL-3.0, self-hosted. If you want that same shared memory carried across a team's devices without running the relay yourself, that's Spinal Cloud, the managed product built on top of Marrow: sign in, link a project, and every machine you approve reads and writes the same brain.

The Pluribus idea

In Pluribus, Carol stays herself while Zosia connects her to a collective that can organize around what she needs. She does not disappear into the hive; the hive works for her.

That is the feeling behind Marrow. Each agent stays its own session and keeps doing what it does best, but they share what matters and coordinate around the same work. You stay in control, and the memory stays in plain files on your machine.

Does it actually help? We measured it

Context per turn stays flat for Marrow from 10 to 1,000 project facts, while a CLAUDE.md climbs from 20,962 to 51,141 tokens per turn

The usual way to tell an agent how your project works is to write it all into a CLAUDE.md, which it then reads on every single turn. That is fine for ten things. A codebase a couple of years old knows a thousand.

We gave a coding agent the same task and the same repo three ways: nothing, everything in a CLAUDE.md, and the same facts in Marrow. 75 runs.

  • A CLAUDE.md costs more the more your project knows. 21k tokens per turn at 10 facts, 51k at a thousand. Marrow stays flat: 24.1k, 23.7k, 24.3k. At a thousand facts that is 2.1× less context (p = 0.002) and $0.50 a task instead of $0.90.
  • Below roughly a hundred facts, just write the file. Marrow loses that one, 0.87×, and takes more turns. We would rather say so than pretend it wins everywhere.
  • An agent with no project memory broke things. It invented a database table, reached for uuid4 where ids are meant to be sortable, and wrote a naive timestamp. Both of the arms that had the knowledge got those right.

Method: same fixture repo and prompt each time, graded by running the code rather than reading it, with bootstrap intervals and a permutation test over 6 runs per cell. There is more on the numbers at marrow.works.

Get started in 3 steps

1. Install (macOS / Linux; other options below):

brew install aryawidjaja/marrow/marrow

2. Set it up from your project's root:

marrow setup          # add --global to wire every repo at once

3. Check setup, then restart your agent. marrow setup reports anything still missing. Claude Code sessions then start with relevant project memory, share activity, and use best-effort file claims to avoid local edit conflicts. The hooks need jq (brew install jq or apt install jq) and never block your work when Marrow is unavailable. Already mid-session? Run /marrow-save once to keep the decisions and discoveries worth carrying forward.

The memory lives in .marrow/ in your project.

See your brain

Marrow isn't a black box, it's a graph you can explore, like a second brain.

marrow-serve          # opens the dashboard at http://localhost:8088

Every memory is a neuron, grouped into the area it belongs to, so the graph has real structure instead of being a hairball. Links connect memories that share a topic, a tag, or related meaning (from embeddings). Browse the tree, drag, zoom, click to read, filter, and add, edit, or delete memories right there. The Hive tab shows every project at once.

Your memories are organised, not a pile

Every memory lives in an area of the project: auth, billing, infra. The agent files it as it writes, so the brain has a shape you can navigate instead of one flat heap.

project  →  area  →  topic  →  versions
marrow areas          # the map: auth 11 · billing 10 · infra 23 · monitoring 10

Your agent sees that same map the moment a session starts, so it knows what the project knows before it answers. It can also weight a recall toward one area without hiding the rest:

marrow add --kind decision --topic jwt-expiry --area auth "We use 15-minute JWTs."

Nothing is forced. If a memory fits no area, it stays unfiled and is still fully searchable. A wrong area is worse than none.

One brain across your projects

By default each project has its own brain. Opt any project into a machine-wide hive with one command, and your agents can recall across all of them:

cd ~/code/webapp && marrow hub register --name webapp
cd ~/code/api    && marrow hub register --name api

marrow hub recall "how do we do auth"   # searches every project, tagged by project

Now an agent working in api can ask what webapp knows. In the dashboard, the Hive tab shows a central core neuron (you) with every project orbiting it, bridged where they share ideas.

Give your agents a room to talk

Once a project joins the hive, its agents can open named rooms, ask each other questions, reply, and hand work over without relying on one giant chat. Claude Code, Codex, Cursor, and other MCP agents on the same machine can use the same channel.

Agents check the inbox when they start and before touching work another session may own. You can read every room in the dashboard's Channel tab, so the coordination stays visible instead of happening behind your back.

One brain across your devices (beta)

Each project is local and private by default. Share the one project you want synced, and the rest stay on your machine. It's like sharing a repo, not your whole disk.

# once, on a server (Docker, Fly.io, any host; see deploy/)
MARROW_TOKEN=$(openssl rand -hex 16) marrow-server

# then in the project you want shared, on each machine
MARROW_TOKEN=<the-token> marrow share --gateway https://your-gateway --space team-app

Same gateway + space + token on two machines routes their MCP memory tools to one remote project store. A decision saved through an agent on your laptop is available to an agent on your desktop. Every other project is untouched. The backbone currently uses one bearer token; run it on infrastructure you control over HTTPS and back up its data volume.

marrow status     # shows whether this project is shared or local
marrow unshare    # back to local, nothing is deleted

Your agent is told which mode it is working in. You can configure sharing from the dashboard's Manage Projects panel. The local dashboard still visualizes the local project store; shared-memory reads and writes happen through the agent's MCP tools. Full scope and deployment guidance are in deploy/README.md. Code anchors and freshness checks need the source tree, so they remain local-only.

More install options

Prebuilt binaries, no Rust:

curl -fsSL https://raw.githubusercontent.com/aryawidjaja/marrow/main/install.sh | sh

From source:

cargo install --git https://github.com/aryawidjaja/marrow marrow-cli marrow-mcp marrow-web marrow-server

This puts marrow, marrow-mcp, marrow-serve, and the cross-device marrow-server on your PATH.

Bringing in an existing project

A fresh brain starts empty. To seed it from docs you already have, the first warm start nudges your agent to run marrow ingest, it lists your README and docs/ and distills them into memory. After that, later sessions can start with those memories available. Any time, run /marrow-save to preserve the decisions and discoveries worth carrying forward.

Using Cursor, Codex, or other MCP agents

The automatic hooks are Claude Code specific, but any MCP agent gets the full memory toolset. Register the server for every Claude Code project:

claude mcp add marrow -s user -- marrow-mcp --root .

For one project, add the same server to .mcp.json (Claude Code), .cursor/mcp.json (Cursor), or your Codex TOML.

Smarter (semantic) search

Search is keyword-based by default, instant and offline. For meaning-based recall (finding a note about "JWT" when you search "login security"), install a semantic build:

brew install aryawidjaja/marrow/marrow-semantic   # multilingual, downloads a small model on first use
marrow embed fastembed

marrow status shows the mode; marrow embed none switches back. Semantic search also powers the "related meaning" links in the dashboard graph.

CLI

Your agent drives Marrow for you, but you can too:

marrow add --kind decision --topic auth "We use short-lived JWTs."   # save
marrow search "token expiry" --weight 1                              # find (0=keyword, 1=semantic)
marrow hub recall "rate limiting"                                    # search the whole hive
marrow list-stale --repo .                                           # notes whose code drifted
marrow consolidate --repo . --apply                                  # merge duplicates
marrow audit                                                         # prove the ledger untampered

marrow add writes a plain markdown file under .marrow/memory/, the YAML frontmatter is metadata, the text below is the memory. The SQLite index is a rebuildable cache over these files.

It doesn't forget the old stuff

The obvious worry with a memory that only ever grows: does the good idea from four months ago just sink? Two things stop it.

Recall follows the links. Ask a question and Marrow doesn't only return what matched your words. It takes the matches and spreads outward through the graph, a few links at a time, weakening with each step. So a note that shares none of your vocabulary still surfaces if it sits behind one that does. That old decision stays reachable through its neighbours, which is exactly what the links are for.

And the brain strengthens what it uses. Every recall is recorded. A memory the agents keep reaching for gets easier to reach again; one nobody has ever touched stays where it is. Recall a thing enough and it comes to you.

When a decision changes, the agent supersedes the old memory instead of appending another active version. Marrow preserves the lineage so the current answer stays clear without losing history.

What's under the hood

  • Staleness detection for Rust: a memory can cite a Rust symbol; Marrow fingerprints it and flags the note when that symbol changes, while tolerating formatting changes and supported relocations.
  • Consolidation: finds genuine duplicates (a near-identical restatement, or a pair that are mutually each other's closest match) and merges them, preserving lineage. It will not merge notes that are merely similar.
  • Associative recall: a question returns the matches and the memories connected to them, found by following links, shared topics and related meaning outward from the hits.
  • Hive mind: sessions join warm, publish best-effort file claims, and read a live activity trail. Claude Code hooks can block a detected local collision, but deliberately fail open rather than risk blocking work when their prerequisites are unavailable.
  • Audit & provenance: every write, edit, and recall lands in an append-only, hash-chained ledger; any answer traces back to its sources. Turn signing on and marrow audit also catches a memory file edited on disk behind Marrow's back.
  • Typed & validated: every memory is a fact or a decision (or an entity), filed in an area under a short topic; bad writes are rejected with the reason, so the brain can't fill up with junk.
  • Expiry & confidence: a memory can say how sure it is, and can carry an expiry date for things that are only true for now. Marrow retires them when they lapse.
  • Runs anywhere: offline single binaries; markdown is the source of truth, SQLite a disposable cache.

The name

Marrow is where the immune system's memory begins: the quiet layer that remembers while the rest of the body keeps changing. Your agents share one too, but it stays yours, on your machine and on your terms.

License

The engine (crates/) is AGPL-3.0-only; the embeddable Python backend (python/marrow-anthropic) is Apache-2.0. Using Marrow from your agent over MCP or the CLI is a separate process, not a derivative work. A commercial license is available, see COMMERCIAL.md.

Rendered live from aryawidjaja/marrow's GitHub README — not stored, always reflects the source repo.

1 Install Method

NameDescriptionCategorySource
mcpb packageInstall via mcpb (stdio transport)mcp-serverhttps://github.com/aryawidjaja/marrow/releases/download/v0.7.1/marrow-mcp.mcpb

0 Comments

Login required
Log in to post a comment or update on this repo.

No comments yet — be the first to share an update.