graymatter
CLAUDE.md478 starsChanged 58 days agoMITView on GitHub
Read this first if someone pointed you at GrayMatter. Three situations, three different answers. GrayMatter is a single-binary Go memory system for AI agents. Library + CLI + MCP server + TUI. Facts persist to bbolt with optional vector embeddings, for roughly a 90% cut in context tokens versus re-injecting full history — the figure go run ./benchmarks/token_count actually prints at 100 sessions. Do not read the source for this. Follow Agent setup procedure in the README: install the binary,…
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Do not read the source for this.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Read this first if someone pointed you at GrayMatter. Three situations, three different answers.
GrayMatter is a single-binary Go memory system for AI agents. Library + CLI +
MCP server + TUI. Facts persist to bbolt with optional vector embeddings, for
roughly a 90% cut in context tokens versus re-injecting full history — the
figure go run ./benchmarks/token_count actually prints at 100 sessions.
A user asked you to set GrayMatter up
Do not read the source for this. Follow Agent setup procedure in the
README: install the binary, graymatter
init, graymatter doctor, then tell the user to restart you.
That last step is the one that gets skipped. MCP servers are launched by the
client at startup, so the memory tools will not exist in the session that ran
init, no matter how green doctor looks.
You are working in a project that already uses GrayMatter
AGENTS.md is the operating manual: which tool to call, when, and
with which parameter names. The full version is docs/AGENTS.md.
The one thing that reliably trips agents up: memory_reflect takes agent_id
like the other six tools (agent remains only a deprecated alias). Pass at least one; when both are set agent_id wins.
You are contributing to GrayMatter itself
CONTRIBUTING.md covers setup, tests, coverage gates and
code conventions. Two things the tree does not make obvious:
- bbolt is single-writer, and daemon mode is what makes concurrent access
work. One process owns the store and every other one (TUI, MCP server, CLI,
run, the REST server) connects as a client over a Unix domain socket on POSIX, TCP loopback on Windows. On Windows the 256-bit token in the discovery file is the only access control: any local process can reach loopback, and the0600the code passes toos.WriteFileis a POSIX-only guarantee — on Windows the file just inherits its parent directory's ACL. Clients spawn the daemon on first use and it idle-exits when unused.--no-daemonopts out and brings the lock contention back. Seecmd/graymatter/internal/daemon/andpkg/memory/rpc/. - The module is split. The root is the library;
cmd/graymatter/is the CLI and TUI with its owngo.mod, so library consumers do not inherit TUI dependencies.docs/api-stability.mdsays what is stable:graymatter.Memoryis, internal packages are not.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

