AB
AiBoss
project

GBrain - Y Combinator President's Open Source Personal Production-Grade AI Memory System

GBrain is a personal, production-grade AI memory system open-sourced by Garry Tan, president of Y Combinator, designed specifically for AI agent platforms such as OpenClaw and Hermes Agent. The tool transforms scattered Markdown notes into...

What is GBrain?

GBrain is an open-source, production-grade AI memory system developed by Garry Tan, president of Y Combinator. It's designed for AI agent platforms such as OpenClaw and Hermes Agent. The tool transforms scattered Markdown notes into searchable, reasonable, and continuously growing knowledge graphs, giving agents long-term memory. Garry himself uses the tool to manage over 10,000 files, over 3,000 contacts, and 13 years of calendar data. The system already has 17,888 pages, 4,383 people, 723 companies, and 21 fully automated scheduled tasks, and was built in just 12 days.

GBrain's main functions

  • Automatic signal captureEach message triggers the cheap model to extract original viewpoints and entity mentions in parallel, which are then automatically archived in the background.
  • Brain-ops priority queryThe agent should check its brain before responding; if it can't find the answer, it should inform the user directly instead of hallucinating.
  • Multi-source content intakeIt supports automatic processing of all formats, including meetings, emails, tweets, PDFs, videos, and GitHub repositories.
  • Automatic entity enrichmentPeople/companies are automatically upgraded based on the number of times they are mentioned (1 time stub → 3 times online supplementary information → 8 times / complete meeting file).
  • Compiled Truth + TimelineThe upper layer represents the current best understanding that can be rewritten, while the lower layer represents the timeline of evidence that is only added later.
  • Hybrid SearchVector + Keyword + RRF Fusion + Multi-Query Expansion + 4-Layer Deduplication, Recall@5 reaches 95%.
  • Knowledge graph self-connectionEach time zero is written, the LLM call automatically extracts entity relationships (attended/works_at/invested_in, etc.).
  • Minions background queueDeterministic tasks use the Postgres native job queue, completing in 753ms with zero token cost and a 100% success rate.
  • Skillify Skills ManagementAutomatically generates SKILL.md, tests, evaluations, and parser triggers to prevent the skill tree from becoming a black box.
  • voice callIt integrates Twilio + OpenAI Realtime, automatically retrieving the other party's profile and generating a call brain page upon receiving a call.
  • Daily BriefingAutomatically summarizes meeting context, active transactions, citation tracking, and to-do items.

GBrain's technical principles

  • Three-tier architecture separationGBrain adopts a separate architecture: Brain Repo (a Git-hosted Markdown file, the only human-readable and editable data source) → GBrain retrieval layer (a hybrid search engine combining Postgres and pgvector) → AI Agent (26 Skills defining read/write logic). The Agent reads and writes through the BrainEngine interface, and the underlying layer supports bidirectional hot migration between PGLite (embedded Postgres, zero-configuration) and PostgresEngine (Supabase).
  • Compiled Truth + Timeline Two-Layer Knowledge ModelEach Markdown page is... --- It is divided into two layers: the top layer is Compiled Truth (the current best understanding, continuously rewritten as new evidence emerges), and the bottom layer is Timeline (the original chain of evidence that is only appended to, not deleted). This design allows cognition to evolve while preserving a complete audit trail, avoiding the loss of history due to pure overwrite updates or query noise caused by pure appends.
  • Zero LLM calls knowledge graph self-connectionAfter each page is written, the deterministic regular expression pipeline automatically extracts entity references (Markdown links + bare slugs), infers type relationships (attended/works_at/invested_in/founded/advises), and performs deduplication, broken link cleanup, and backlink updates. The entire process involves zero LLM calls and is implemented using pure local regular expressions and priority inference cascades.

How to use GBrain

  • Automatic Agent Installation (Recommended)Paste the command into OpenClaw or Hermes Agent. Retrieve and follow the instructions at: https://raw.githubusercontent.com/garrytan/gbrain/master/INSTALL_FOR_AGENTS.mdThe agent automatically clones the repository, installs dependencies, loads 26 skills, and configures scheduled tasks, completing the process in approximately 30 minutes.
  • Standalone CLI:git clone https://github.com/garrytan/gbrain.git && cd gbrain && bun install && bun link,Then gbrain init Initialize the local brain (PGLite, ready in 2 seconds).gbrain import ~/notes/ Import notes,gbrain query "..." Search.
  • MCP ServerLocal access gbrain serve Exposed 30+ MCP tools, integrated with Claude Code/Cursor/Windsurf; remotely deployed to Supabase and then integrated with Claude Desktop/Cowork/Perplexity via a fixed ngrok domain.
  • Data access:run gbrain integrations View and configure integrated recipes for Gmail, Calendar, Twitter, meeting transcription, and more.

Key information and usage requirements for GBrain

  • Environmental requirementsNode.js + Bun (recommended), PGLite for zero-configuration local operation, or Supabase Postgres ($25/month) for multi-device synchronization.
  • API KeyRequires configuration of OpenAI (embedding), Anthropic (optional, for sub-agents), Groq (speech transcription), etc.
  • storageMarkdown files are the sole data source and can be directly edited by humans.gbrain sync Automatic synchronization.
  • Relationship with GStackGStack (80,000+ Stars) teaches Agents how to code, while GBrain teaches Agents how to take notes and think. hosts/gbrain.ts The bridge allows for combined use.
  • licenseIt is an open-source product developed by MIT and is commercially usable.

GBrain's core advantages

  • Production-level verificationThis is a workflow developed through real-world testing, not a toy-like demo, personally used by the YC CEO.
  • Self-evolving knowledge graphEntity relationships are automatically extracted with zero LLM calls, improving search accuracy by 28.8 percentage points compared to pure vectors.
  • Deterministic background tasksMinions separates deterministic and judgmental tasks, reducing costs from $0.03 per task to $0 and increasing the success rate from 0% to 100%.
  • Layered knowledge modelCompiled Truth ensures real-time evolution of cognition, while Timeline ensures that the chain of evidence is never lost.
  • Agent native designIt supports installation, maintenance, and expansion all for AI Agents, eliminating the need for manual human intervention.

GBrain's project address

  • Project official websitehttps://github.com/garrytan/gbrain

GBrain's Competitive Product Comparison

Comparison Dimensions GBrain Mem0 LlamaIndex Pinecone
position AI Agent Long-Term Memory System Personalized AI Memory Layer LLM Application Data Framework Vector Database
knowledge graph Native self-join, zero LLM calls No native map RAG maps need to be constructed manually. None, pure vector storage
Automatic upgrade of physical entities Automatic upgrade based on number of mentions Based on user interaction memory Developer configuration required Not involved
Search methods Vector + Keyword + RRF + Graph Traversal Vector search is the primary method. Multiple search engines are available Pure vector/hybrid search
Agent integration OpenClaw/Hermes/MCP native Multi-framework SDK LangChain/LlamaIndex Self-packaging is required.
Background tasks Minions native queue, zero token No native queue none none
Data format Markdown as the sole source Multi-format API intake Multi-format nodes Vector Embedding
Open source license MIT Apache 2.0 MIT Commercial/Open Source Hybrid
Production Validation YC President, 17,000-page production environment Multiple companies use Widely adopted by enterprises Widely adopted by enterprises
Installation method Agent self-installation takes 30 minutes / CLI install SDK with pip pip install Cloud Hosting/Self-hosting

GBrain's application scenarios

  • Investor/Founder Relationship ManagementAutomatically archives meetings, emails, and social media posts, generating a complete profile and interaction history of the other party 30 seconds before the meeting.
  • Personal knowledge baseIt transforms years of notes, articles, and ideas into reasonable knowledge graphs, supporting queries such as "my opinion on something six months ago".
  • Research AutomationAutomatically extract entities, create citations, and generate timelines from papers, reports, and videos to assist academic or industry research.
  • Content creation assistanceTrack sources of inspiration, automatically complete citations, maintain consistency of hashtags, and prevent information omissions during the creative process.
  • Smart Schedule and TasksIt automatically prepares meeting summaries daily, inspects expired pages, repairs broken references, and generates periodic reports.