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 85/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About GBrain.

GBrain is a memory layer for the AI agents you already run. It stores explicit facts with their sources, supports corrections and withdrawal, and makes one memory available across agents through a CLI and an MCP server. A brain starts keyless with keyword retrieval, and semantic search, cited synthesis, a typed knowledge graph and background enrichment are separate opt-in additions. Everything runs on your own hardware, database and keys.

There are two query paths. Search returns the top pages by hybrid scoring (vector, keyword, reciprocal rank fusion, a source-tier boost and a reranker), for an agent's context window or a citation lookup. Think runs the same retrieval and then composes a synthesized answer with citations to the source pages and a gap analysis that notes stale pages, uncited claims, contradicting pages and holes to fill. The graph layer extracts typed edges from page references on trusted local writes without LLM calls, so a question such as who works at a given company follows stored relationships rather than text similarity, and extracted edges are presented as evidence to inspect rather than proof.

The loop is signal, search, respond, write, auto-link, sync. After opt-in, a signal detector captures durable ideas and entity mentions from substantive messages, the agent looks in the brain before any external API call, each write lands as a page plus a timeline entry, and cron-driven enrichment (the dream cycle) dedups people pages, fixes citations, scores salience, finds contradictions and prepares the next day's tasks overnight. The intended deployment is an always-on server-hosted agent on OpenClaw or Hermes. GBrain also connects to Claude Code and Codex as a plugin, to Cursor, Windsurf and any stdio MCP client, and to cloud agents such as Grok Bot and Muse by publishing the brain over MCP on a Tailscale tailnet. A company-brain mode scopes authenticated remote clients by source and operation grants plus visibility filters.

Markdown brain repositories are synced and parsed into one of two engines behind a single contract: PGLite (Postgres via WASM, zero-config, the default for personal brains up to about 50K pages) or Postgres with pgvector (Supabase or self-hosted) for shared, large or multi-machine deployments. The CLI and the MCP server are generated from that one contract. Schema packs define page types, with a default 15-type taxonomy (person, company, media, tweet, analysis, concept, source, deal, email, slack, writing, project and more) and a detect, suggest and review flow that proposes a pack from your own files. Embedding providers include Voyage (the default), OpenAI, OpenRouter, Google Gemini, Azure OpenAI, MiniMax, Alibaba DashScope, Zhipu, Ollama, llama.cpp, LM Studio, Together and a LiteLLM proxy, with reranking through Voyage or a local llama.cpp cross-encoder. Integration recipes bring in phone calls via Twilio and OpenAI Realtime, Gmail, Calendar and Contacts through your own OAuth client, meeting webhooks, and a local credential vault. Memorable, an optional and default-off add-on, stores replayable procedures from coding sessions so an agent remembers how, not only what.

  • Explicit memory with provenance: facts stored with their sources, with corrections and withdrawal, shared across agents
  • Hybrid retrieval: vector, keyword, reciprocal rank fusion, source-tier boost and reranking, with keyword-only search needing no model API
  • Cited synthesis: a composed answer across people, companies, deals and ideas with citations and a gap analysis of what the brain does not know
  • Typed knowledge graph: edges extracted from page references on trusted local writes without LLM calls, queryable by relationship
  • Dream cycle: cron-driven enrichment that dedups people pages, fixes citations, scores salience, finds contradictions and preps tasks overnight
  • Agent connections: OpenClaw and Hermes always-on deployments, Claude Code and Codex plugins, Cursor, Windsurf and any stdio MCP client, and remote access over a Tailscale tailnet for Grok Bot, Muse and ChatGPT
  • Two engines, one contract: PGLite by default for personal brains, Postgres with pgvector (Supabase or self-hosted) for shared or large deployments
  • Schema packs: bundled page-type taxonomies, custom packs authored from your own files, and staged migration between packs
  • Company brain: federated multi-user memory with OAuth-scoped clients, source and operation grants and visibility filters
  • Embedding and reranking providers: Voyage, OpenAI, OpenRouter, Google Gemini, Azure OpenAI, MiniMax, Alibaba DashScope, Zhipu, Ollama, llama.cpp, LM Studio, Together and a LiteLLM proxy
  • Data ingestion: files, conversations, Gmail, Calendar and Contacts, meeting webhooks, voice calls via Twilio, and an existing company knowledge repository with an import plan
  • Skill optimization: treats a skill file as a trainable parameter, generating a benchmark and keeping only edits that score higher

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.

04 / Build

Build with GBrain.

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

Get GBrain →

Browse the catalog