> your AI forgets everything between sessions.
> gingugu fixes that.
a local MCP server that gives AI coding assistants a real long-term brain — persistent, structured, searchable memory that survives across sessions, repos, and projects.
[ python 3.11+ ] [ protocol: MCP ] [ storage: SQLite ] [ license: MIT ] [ 0% cloud · 0 telemetry ]
$ whoami

every session with an AI assistant starts from zero. the decisions you made yesterday, the bug you fixed last week, the architecture you settled on a month ago — gone.

existing memory tools dump observations into a flat pile. no structure, no staleness tracking, no relationships, no sense of what's relevant right now.

gingugu is a structured long-term brain — not a junk drawer. one SQLite file on your machine. no cloud, no API keys, no telemetry.

and storage is the easy half. a memory server your agent never writes to is an empty database — the failure mode isn't retrieval, it's discipline. so gingugu ships that too: gingugu init installs a SessionStart hook that injects the memory protocol at the top of every session, and a stop hook that checks a session with real work in it actually wrote something down. the harness runs them whether or not the agent feels like it.

$ python -m bench
// hybrid retrieval: bm25 over fts5 + local vectors, fused with RRF
MRR .............. 0.828
recall@1 ......... 0.611
recall@5 ......... 0.983

// 30 labeled questions against a real ~1,100-memory brain.
// not a public benchmark suite — read it as a regression baseline,
// not a cross-product score. runner ships in the repo: point it
// at your own store and get your own numbers.
$ cat features.txt
[namespaces] memories auto-scoped to repos/projects, cross-repo pattern sharing
[hybrid_search] FTS5 BM25 + local semantic embeddings fused with RRF — fast, local, zero API calls, no PyTorch
[trust_map] trust-led scoring, dormancy tracking (never forgets), last-confirmed tracking, spreading activation
[relations] typed edges that record what search can't infer: supersedes · contradicts · caused_by · parent_of · child_of (· related_to as fallback)
[edge_repair] list the edges you actually have, then retype a mislabelled one in place or drop it - correcting a label costs nothing, so precision stays cheap
[confidence] verified → inferred → stale → deprecated lifecycle
[state_claims] a memory saying "PR #10 open" was true when written - claims are tracked separately so you can mark one resolved without rewriting the record
[review_hints] point-in-time memories ("PR open, waiting on…", passed expiry dates) get advisory staleness flags - you reconcile, the server never mutates
[consolidate] find near-dupe clusters (read-only scan), then merge, summarize, or dedupe on demand
[auto_context] surfaces relevant memories on session start - one call loads many namespaces deduped, optional compact mode
[pinned] ranking answers "what's relevant?" - it can't answer "what must never be missing?" pin the handful of rules that always load, exempt from ranking
[cred_vault] API keys/tokens in the OS keychain — never in plaintext
[explorer_ui] interactive knowledge graph + dashboard for your memory data
[health] memory stats, dormancy reports, review sweep, namespace overviews, and graph metrics - orphans, edge type mix, and edges your traversal will never reach
[central_brain] optional: gingugu serve runs the same server over HTTP behind a bearer token; gingugu promote harvests local gold up to it with provenance
[bootstrap] gingugu init wires a repo for Claude Code in one command - a SessionStart hook auto-injects the memory protocol every session (no rules file to paste), plus a save-discipline stop hook and /sink-the-ship. it also keeps the protocol current in your user-level ~/.claude/CLAUDE.md, in a marked block it owns - your own prose above and below it is never touched
$ ls tools/ # 18 MCP tools
memory_storememory_recallmemory_contextmemory_update memory_relatememory_edgesmemory_unrelatememory_consolidate memory_forgetmemory_namespacesmemory_exportmemory_import memory_statsmemory_searchcredential_storecredential_get credential_listcredential_delete
$ gingugu --demo
// session start — your agent runs:
memory_context(namespace="my-app", task_hint="fix auth bug")

→ surfaced 4 memories:
  [bug]      JWT refresh loop on expired tokens — FIXED in a81f2c
  [decision] auth lives in middleware/, not per-route guards
  [pattern]  all API errors wrap in ApiError(code, msg)
  [fact]     staging uses cognito pool us-east-1_x7Yq

// your AI now remembers. like it never left.
$ ./install.sh
pip install gingugu

or uv tool install gingugu. then, in your repo, run gingugu init to wire up Claude Code in one command — a SessionStart hook auto-loads the memory protocol every session (no rules file to paste). other agents: point your MCP config at it and use gingugu init --client windsurf|cursor|cline. full setup in the README.

$ cat links.txt