# graymatter

> Three lines of code to give your AI agents persistent memory. Reduce 90% token consumption while also maintaining quality.

- **Category:** AI
- **Licence:** MIT
- **Latest version:** v0.20.1
- **Open source:** oss
- **Languages:** Go
- **Platforms:** Go, Linux, Homebrew, Scoop
- **Tags:** CLI, Mcp, Mcp Server, Ai Agents, Semantic Search, Knowledge Graph, Ai Tools, Go, Self Hosted, Offline First, Persistent memory, Claude code, Vector embeddings, Agent memory, Context Management, Go Library, Token Reduction

## Description

GrayMatter is a standalone binary that provides persistent memory storage for AI agents. It reduces context token usage by 90% through semantic recall of relevant facts instead of injecting full conversation history. The software builds an automatic knowledge graph from usage, supports multiple embedding providers (Ollama local models, OpenAI, Voyage AI), and degrades gracefully to keyword-only mode when no API keys are configured. Available as installable binaries via package managers or direct download, it integrates with popular AI IDEs including Claude Code, Cursor, Codex, OpenCode, Antigravity, Windsurf, VS Code Copilot Agent, Zed, and Cline through the Model Context Protocol.

## Links

- [Homepage](https://github.com/angelnicolasc/graymatter)
- [Website](https://graymatter.nickcerutti.workers.dev)
- [Quick Start Guide](https://graymatter.nickcerutti.workers.dev/guides/quickstart/)
- [Integrations](https://raw.githubusercontent.com/angelnicolasc/graymatter/main/docs/integrations.md)
- [MCP Server Score](https://glama.ai/mcp/servers/angelnicolasc/graymatter)
- [GitHub Repository](https://github.com/angelnicolasc/graymatter)

---
Source: https://selfhost.directory/project/graymatter