Home / Servers

gaius

by jkubo

gaius

Ops memory lifecycle manager for AI coding agents.

License PyPI GitHub

Not another RAG chatbot memory — a production-grade system that extracts facts from Claude Code, Gemini CLI, Grok, and Codex sessions, ranks them into an inject-ready corpus, enforces behavioral gates, and prevents you from breaking prod at 3am.

Why gaius — three things most agent-memory tools skip:

  • Runs unattended — extract → promote → inject with no human in the hot path; correction is optional.
  • Prevents actions, not just recalls them — hard gates exit:2 on force-push, unconfirmed live-trade, prod-delete.
  • Fully offline — BM25 + sqlite-vec in one SQLite file. No API keys, no cloud.
# CLI (offline core). Extras: [semantic], [mcp]
pip install gaius-memory

# Or with uv / Claude Code MCP (see .mcp.json):
# uvx --from "gaius-memory[mcp]" gaius-mcp
#
# Tip: for unreleased mainline, pin git:
# pip install "gaius-memory @ git+https://github.com/jkubo/gaius"

⚠️ Install name is gaius-memory, not bare gaius. PyPI already has an unrelated package named gaius (ImmobilienScout24 deploy client v145+). That package owns neither our import path nor our CLI forever, but pip install gaius will not install this project. Always: pip install gaius-memory → import gaius, console script gaius.

gaius retire      # scan sessions → stage summaries
gaius batch       # (optional) review + correct — facts inject by default
gaius inject --task "what you're working on"   # inject context into active session

What It Does

Engineers running Claude Code all day generate enormous amounts of institutional knowledge that vanishes when the context window closes. gaius captures it:

  1. Extract — scans Claude Code (and Gemini CLI) session JSONLs, extracts compact summaries with typed signals (knowledge, patterns, errors)
  2. Review (optional) — extracted facts are promoted and inject-eligible by default; review is a correction loop, not a gate before entry. reject drops a bad fact, defer punts it, agent-review clears it from the queue without touching its rank, confirm pins a verified one — while decay, dedup, and mnemosyne health checks keep quality up without a human bottleneck.
  3. Index — promotes extracted facts into a hybrid keyword + semantic SQLite database (facts.db)
  4. Inject — at task start, retrieves relevant facts and loads skills context into the session
  5. Coordinate — cross-session claims, shared findings, and a claimable task pool (gaius concord) so parallel sessions on one machine divide work instead of colliding

Benchmark

The demo below is a regression / smoke check, NOT a quality score: it confirms retrieval still works on a fresh clone. A perfect score on a hand-built 27-fact corpus (same author wrote the facts and the queries) proves the pipeline runs, nothing more. Real quality is the External evaluation section below, on a benchmark gaius didn't build.

bench_inject.py builds a throwaway SQLite corpus from benchmarks/demo_corpus/:

$ python3 benchmarks/bench_inject.py

gaius Injection Benchmark (25 queries, bundled demo corpus)
════════════════════════════════════════════════════════════
Recall:    25/25 (100%)  regression check, NOT a quality score
Prec-warn: 3/25
Corpus:    27 demo facts  (throwaway SQLite, no daemon, ~0.08s/query)

Semantic mode (embed daemon, real corpus):
Cold start:  ~7s    (first query, model load)
Daemon warm: ~8ms   (Unix socket, model kept in memory)

Storage: sqlite-vec (384-dim, all-MiniLM-L6-v2) + BM25 in a single SQLite file
No API keys, no cloud, runs entirely offline.

External evaluation (L

Related servers

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

NOASSERTION198,904

@modelcontextprotocol/server-everything

Official

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,105

@modelcontextprotocol/server-filesystem

Official

by modelcontextprotocol

MCP server for filesystem access

SEE LICENSE IN LICENSE89,105

mcp-server-fetch

Official

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,105