This is an early release preview. You may encounter bugs.
GBrain logo
Unclaimed

Tool memory data-wrangling

GBrain

Local knowledge brain that indexes a vault into Postgres and exposes retrieval, synthesis, and a graph over MCP

A 88/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
No votes yet

01 / About

What GBrain is.

GBrain is a memory layer for AI agents that indexes a git repository of markdown pages into Postgres and exposes retrieval, synthesis, a knowledge graph, and a job queue over a command-line interface and a Model Context Protocol (MCP) server. It runs as a persistent brain behind an always-on agent (OpenClaw or Hermes) or as a retrieval layer wired into Claude Code or Codex. Its author operates a deployment of about 155,000 pages, 24,500 people, and 5,300 companies with 66 cron jobs.

Two query paths exist. gbrain search returns top pages ranked by a hybrid score combining pgvector HNSW vector search, BM25 keyword search, reciprocal-rank fusion, source-tier boosts, and an optional cross-encoder reranker. gbrain think runs the same retrieval and then composes a cited answer that also notes what the brain does not know: stale pages, uncited claims, and contradictions between pages. Every page write extracts entity references from wikilinks and typed-link syntax and creates typed graph edges (attended, worksat, investedin, founded, advises) without LLM calls; multi-hop traversal runs through gbrain graph-query. On a 240-page test corpus the graph-enabled configuration measured P@5 of 49.1% and R@5 of 97.9%, 31.4 points of P@5 above the graph-disabled variant.

Two storage engines implement one BrainEngine contract of 140+ methods: PGLite (Postgres 17 via WASM, no server) for personal brains up to roughly 50,000 pages, and Postgres with pgvector (Supabase or self-hosted) for shared or multi-machine use. The brain repo stays the system of record; deletions in git become soft deletes in the database, and per-login scoping lets team members query only their own slice. Bundled schema packs define page types (person, company, deal, email, project, and so on), and gbrain schema commands can detect and propose types from an existing vault such as an Obsidian export. Keyless installs work with keyword search; an OpenAI, Voyage, or Anthropic key adds semantic search and fact extraction.

Features

  • Hybrid search: vector, BM25, RRF, source-tier boost, query rewriting, and reranking, with conservative, balanced, and tokenmax modes and --explain per-stage attribution
  • Synthesis: gbrain think returns cited prose answers with gap analysis on stale, uncited, or contradictory material
  • Self-wiring graph: typed edges created on every write from wikilinks, with multi-hop graph queries and Obsidian basename resolution
  • Two engines: zero-config PGLite for local brains and Postgres plus pgvector for shared deployments, behind one contract
  • Minions job queue: Postgres-native queue for durable subagents with two-phase persistence, shell jobs, child jobs, rate leases, and optional per-job process isolation
  • Agent bootstrap: an interview-driven setup creates identity files, a private GitHub repo, and MCP wiring for Codex or Claude Code
  • Memory verbs protocol: a seven-verb MCP surface (recall, remember, entity, synthesize, forget, context_pack, delta) for coding agents
  • Schema packs: bundled taxonomies plus detect, suggest, and review commands that derive types from your own files
  • Ingestion: Gmail, calendar, and contacts via ClawVisor, Google Takeout archives, voice calls through Twilio, and email and calendar webhooks
  • Provider matrix: embeddings from Voyage, OpenAI, OpenRouter, Gemini, Azure OpenAI, MiniMax, DashScope, Zhipu, Ollama, llama.cpp, and LiteLLM; rerankers from Voyage or a local llama-server
  • Eval suite: LongMemEval, NamedThingBench retrieval gates, BrainBench cross-harness conformance, and a suspected-contradictions checker
  • Skills and crons: 50+ bundled markdown skills for capture, ingest, enrichment, and an overnight consolidation cycle

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

03 / Build

Build with GBrain.

Browse the catalogue for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get GBrain →

Browse the catalogue