30 sec to give your AI agents persistent memory. Reduce 90% token consumption while also maintaining quality.
# Add to your Claude Code skills
git clone https://github.com/angelnicolasc/graymatterLast scanned: 5/24/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-24T07:23:55.518Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}graymatter is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by angelnicolasc. 30 sec to give your AI agents persistent memory. Reduce 90% token consumption while also maintaining quality. It has 463 GitHub stars.
Yes. graymatter passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/angelnicolasc/graymatter" and add it to your Claude Code skills directory (see the Installation section above).
graymatter is primarily written in Go. It is open-source under angelnicolasc on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh graymatter against similar tools.
No comments yet. Be the first to share your thoughts!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
AI agents forget everything between sessions. GrayMatter gives them persistent memory, a self-building knowledge graph, and cuts context tokens by 90%. One binary. Drop it in. Run it. No Docker, no databases, no config files, no cloud accounts, no bullshit. General-purpose MCP server. Zero vendor lock-in. Works with Claude Code, Cursor, Codex, OpenCode, Antigravity — and any MCP-compatible client. Also a plain Go library if you don't use MCP. Free. Offline. No account required.
Every AI agent is stateless by default. Each run re-injects the full conversation history — and that history grows linearly. Two prompts in and you've already burned half of your daily quota.
That's not just a memory problem. That's a money and performance problem.
Mem0, Zep, Supermemory solve this — but they're Python/TypeScript-only and require a running server. The Go ecosystem has no production-ready, embeddable, zero-dependency memory layer for agents.
That gap is GrayMatter.
Your agent doesn't just remember facts — it builds a map of how they connect.
Run the daemon with --kg and every consolidation cycle extracts typed
entities (person, organization, project) and links the ones that appear
together. No manual tagging. No configuration. The graph builds itself from
ordinary use.
graymatter daemon run --kg # that's it — the graph builds itself
The graph as one self-contained page — inline force-directed SVG, zero external assets, works offline. Hover any edge to see the fact IDs that produced it:
graymatter kg render --out graph.html
graymatter kg render --out graph.dot # Graphviz, for your own layout
graymatter doctor --graph --html # analytics + this render in one go
Watch it build, one frame per session:
scripts/kg-timelapse.sh # deterministic corpus -> frames -> GIF
# or anywhere: scripts/Dockerfile.kg-timelapse
You can't improve what you can't see.
graymatter tui opens a live terminal dashboard with everything your
agent memory is doing — no extra setup required.
What you get at a glance:
The dashboard auto-refreshes every 5 seconds. Press 1–4 to switch tabs,
r to force refresh, q to quit.
graymatter doctor --graph extends visibility to the knowledge graph itself:
hubs by degree, articulation points, orphans, and a declared connectivity
ratio — printed or emitted as JSON.
| Persistent memory | Facts survive across sessions. Recall by meaning, not just keyword |
| 90% token reduction | Top-8 relevant facts instead of full-history injection |
| Automatic hooks | Claude Code injects memory every turn — no tool calls required (graymatter hooks install) |
| Receipts, not vibes | recall --explain returns why each fact ranked: per-signal ranks, fused score, provenance |
| Knowledge graph | Typed entities and co-mention edges, auto-populated from ordinary use |
| Self-curation | memory_reflect lets the agent add, update, forget, and link its own memories |
| Context block | Projects top facts into CLAUDE.md / AGENTS.md inside a token budget (context-sync) |
| Free auditor | doctor --audit measures tokens, duplicates, staleness, and marker conflicts in any instruction file |
| Deterministic decay | 30-day half-life; facts fade when nothing touches them. Tombstones, never deletes |
| Single binary | ~10 MB static. No Docker, no Redis, no config files, no cloud accounts |
Install and see it working in under a minute — no API keys, no Ollama:
go install github.com/angelnicolasc/graymatter/cmd/graymatter@latest
graymatter demo # a working store with 3 agents, then the TUI opens
graymatter init # wire YOUR project: MCP config + memory block
graymatter init --hooks # Claude Code: memory injected every turn
graymatter doctor # verify everything
graymatter demo seeds a scratch store, runs consolidation, and opens the
TUI — then graymatter kg render --out kg-graph.html shows the graph it
built. Restart your editor. Five memory tools are live.
# Homebrew (macOS / Linux)
brew install angelnicolasc/tap/graymatter
# Scoop (Windows)
scoop bucket add angelnicolasc https://github.com/angelnicolasc/scoop-bucket
scoop install graymatter
# Linux (x86_64)
curl -sSL https://github.com/angelnicolasc/graymatter/releases/download/v0.18.0/graymatter_0.18.0_linux_amd64.tar.gz | tar -xz && sudo mv graymatter /usr/local/bin/
# macOS (Apple Silicon)
curl -sSL https://github.com/angelnicolasc/graymatter/releases/download/v0.18.0/graymatter_0.18.0_darwin_arm64.tar.gz | tar -xz && sudo mv graymatter /usr/local/bin/
# Windows (PowerShell)
iwr https://github.com/angelnicolasc/graymatter/releases/download/v0.18.0/graymatter_0.18.0_windows_amd64.zip -OutFile graymatter.zip
Expand-Archive graymatter.zip -DestinationPath .
graymatter init auto-wires every supported client at once. Existing entries
from other MCP servers are merged, never overwritten.
| Client | Config file | Scope |
|---|---|---|
| Claude Code | .mcp.json |
project |
| Cursor | .cursor/mcp.json |
project |
| Codex (OpenAI) | ~/.codex/config.toml |
home |
| OpenCode | opencode.jsonc |
project |
| Antigravity (Google) | mcp_config.json |
opt-in |
| Windsurf | .windsurf/mcp.json |
project |
| VS Code Copilot Agent | .vscode/mcp.json |
project |
Also works out of the box: Pi (reads .mcp.json natively), Zed, Cline,
and any MCP-compatible client — point them at graymatter mcp serve.
Per-client verified configs for 25 clients, including the ones that need a
different shape (VS Code's servers key, Codex TOML, Zed's
context_servers), live in docs/integrations.md.
See docs/AGENTS.md for tool parameters and query patterns.
Numbers produced by go run ./benchmarks/token_count — real Recall calls,
keyword embedder, no LLM required:
| Sessions | Full injection | GrayMatter | Reduction |
|---|---|---|---|
| 1 | ~8 |