Skip to content

๐Ÿง  100% local ยท MCP-native ยท MIT-licensed

Memory your AI agent actually keeps

Local, private long-term memory for AI coding agents โ€” hybrid graph + vector search, two-stage verification, and an autonomous Night Gardener. Runs entirely on your machine. Zero cloud by default.

๐Ÿš€  Quick Start โ˜…  Star on GitHub

uv tool install hydramem
hydramem init ~/my-memory && cd ~/my-memory
hydramem ingest ./kms && hydramem search "what did we decide about auth?"
0token savings vs naive RAG
auditable, not a vibe
0MCP tools
Claude Desktop ยท Cursor ยท OpenCode
0lines of code
readable in an afternoon
0bytes sent to the cloud
by default
$ hydramem stats --last-7d
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  HydraMem Stats โ€“ last 7 days                   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Tool calls               โ”‚                 142  โ”‚
โ”‚ Tokens (naive RAG)       โ”‚               1.4M   โ”‚
โ”‚ Tokens injected          โ”‚               312K   โ”‚
โ”‚ Tokens saved             โ”‚    1.09M (77.8%)     โ”‚
โ”‚ Avg VoG score            โ”‚              0.887   โ”‚
โ”‚ Rejected by SR-MKG       โ”‚                 89   โ”‚
โ”‚ Hallucinations blocked   โ”‚                  5   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Why HydraMem

  •  100% local, zero exfiltration


    Your codebase context, graph, vectors and telemetry never leave your machine. No cloud memory service in the loop. Secrets come from env vars only.

  •  Hybrid graph + vector search


    LanceDB / Grafeo vectors + graph traversal + BM25, fused with Reciprocal Rank Fusion in a single query.

  •  Two-stage verification


    Every relation passes a topological SR-MKG scorer and an optional VoG groundedness check โ€” so the graph never fills with hallucinated edges.

  •  Autonomous Night Gardener


    Offline relation inference & pruning that refines the graph overnight โ€” and emits zero relations when there is no real evidence.

  •  MCP-native (18 tools)


    A FastMCP server that plugs into Claude Desktop, Cursor and OpenCode over stdio or HTTP. Single-tenant by design.

  •  Honest & auditable


    hydramem stats --raw audits every token saved. No fabricated metrics โ€” if a component doesn't measurably work, the docs say so.

Quick start in 60 seconds

uv tool install hydramem
hydramem init ~/my-memory
cd ~/my-memory
pip install hydramem
# โ€ฆor: pipx install hydramem
hydramem init ~/my-memory
cd ~/my-memory
git clone https://github.com/xusliebana/hydramem && cd hydramem
cp config.yml.example config.yml
uv sync
uv run hydramem --help

Then ingest your notes and ask a question โ€” everything runs locally:

hydramem ingest ./kms --project myproject
hydramem search "what does my documentation say about the Night Gardener?"
hydramem serve --transport stdio        # expose to your MCP client

Full quick start โ†’ All MCP tools โ†’ Integrations โ†’

How it works

AI client (Claude Desktop / Cursor / OpenCode)
        โ”‚  MCP (stdio ยท http)
        โ–ผ
HydraMem MCP server (FastMCP ยท 18 tools ยท local telemetry)
        โ”‚
   โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ–ผ                    โ–ผ                     โ–ผ
Ingest             Hybrid search         Night Gardener
chunk โ†’ embed      vector + graph        infer โ†’ verify โ†’ prune
(Nomic v1.5,       + BM25 (RRF)          (offline, evidence-only)
 512-d, local)     โ†’ SR-MKG โ†’ VoG
        โ”‚                    โ”‚                    โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ–ผ                     โ–ผ
        Graph store (Grafeo)   Vector store (LanceDB / Grafeo HNSW)

The default stack is Gemma 4 (gemma4:e4b) for local reasoning/verification and Nomic Embed Text v1.5 (Matryoshka, truncated to 512-d) for embeddings โ€” both run locally. Swap any of them in config.yml.

How does it compare?

Project Local-first Graph + vector Verifies relations Offline learning MCP-native License
HydraMem โœ… โœ… โœ… (SR-MKG + VoG) โœ… (Night Gardener) โœ… MIT
Mem0 partial optional โŒ partial community Apache-2.0
Letta / MemGPT โœ… โŒ โŒ โŒ โŒ Apache-2.0
Zep / Graphiti partial โœ… partial โœ… community Apache-2.0
MS GraphRAG โœ… โœ… indirect โŒ โŒ MIT

Honest positioning

HydraMem is not the first memory system, graph-RAG, or hallucination filter. It's an opinionated local-first integration of those patterns, small enough to read in an afternoon (~5k LOC) and with metrics you can audit.