Contents
Introduction
Garry Tan, President and CEO of Y Combinator, has a problem that most AI tools still haven’t solved. His agents were gathering information just fine — meetings, emails, tweets, voice calls, ideas. But every morning, they started fresh. No memory of yesterday’s context. No synthesis of what they’d learned. Just raw pages with no connection between them.
So he built his own solution.
GBrain is the production brain behind Garry’s personal AI deployment — and it runs at a scale that is hard to ignore: 146,646 pages, 24,585 people, 5,339 companies, 66 cron jobs running autonomously. Now it’s open source under MIT, with 23,293 GitHub stars and 3,335 forks in just two months since its April 2026 launch.
Let’s break down what makes GBrain different — and why it might be the brain layer your own AI agents have been missing.
What Makes GBrain Different from Every Other Knowledge Tool
The best way to understand GBrain is to see what happens when you ask it a question. Say you have a meeting with Alice tomorrow. Here’s what most personal knowledge tools give you:
- people/alice — Alice runs engineering at Acme…
- meetings/2026-03-15-alice-q1 — Q1 product review with Alice…
- customers/acme — Acme is a series-B fintech…
Five pages you now have to open and read yourself. The tool found the right material, but it didn’t do the work.
Here’s what GBrain gives you — the actual answer with citations and a gap analysis:
“Alice runs engineering at Acme (a series-B fintech). You last spoke on April 22 in a quick pricing chat. Three things are still open from that conversation: (1) She owes you the security review for the new tier (deadline was May 1; no update since). (2) You committed to pricing for a 500-seat tier (you sent it April 25; no response yet). (3) She mentioned they’re hiring a CISO; you said you’d intro someone from your network. Heads up: nothing’s been added to the brain about Alice or Acme since April 22 — six weeks ago. Worth asking her to catch up before assuming any of this is still current.”
This is the difference between a search engine and a brain. Search finds the pages. The brain reads them for you and writes the answer. The gap analysis — the part where GBrain tells you what it doesn’t know — is the single feature that changes how you use a knowledge system.
The Self-Wiring Knowledge Graph
GBrain doesn’t just store markdown files in a git repo. It builds a knowledge graph automatically. Every time you write a page, GBrain extracts entity references and creates typed edges — attended, works_at, invested_in, founded, advises — with zero LLM calls.
This matters because pure vector search returns chunks that are semantically close. The graph returns chunks that are factually connected. Ask ‘who works at Acme AI?’ or ‘what did Bob invest in this quarter?’ — vector search alone can’t reach those answers reliably. The graph can.
The benchmark numbers tell the story: P@5 49.1%, R@5 97.9% on a 240-page Opus-generated rich-prose corpus. That’s a +31.4 point lift in P@5 over the graph-disabled variant and over ripgrep-BM25 + vector-only RAG by a similar margin. Full BrainBench scorecards live in the sibling gbrain-evals repo.
Install in 30 Minutes
GBrain is designed to be installed and operated by an AI agent. The fastest path is to let your agent do the work.
If you’re running Claude Code or Codex, you can spin up a local brain and connect it in two commands — zero server, zero token, zero tunnel:
gbrain init --pglite # 2-second local brain (no Docker)
claude mcp add gbrain -- gbrain serve # or: codex mcp add gbrain -- gbrain serve
If you’re running OpenClaw or Hermes (agent platforms that Garry also built), paste one URL into your agent, answer a few API key questions, and walk away. ~30 minutes later you have 43 skills, the overnight dream cycle, and a verified install.
No agent platform at all? The CLI standalone path is just as straightforward:
bun install -g github:garrytan/gbrain
gbrain init --pglite # 2 seconds; no server, no Docker
gbrain doctor # verify health
gbrain import ~/notes/ # index your markdown
gbrain query 'what themes show up across my notes?'
The PGLite engine is a clever architectural choice — Postgres 17 running via WASM. Your database is ready in 2 seconds with zero server setup. For larger deployments (team brains, company knowledge bases), GBrain scales to Postgres + pgvector on Supabase with a single migration command.
Company Brain = Team Institutional Memory
GBrain started as a personal tool, but it has evolved into something more ambitious. The company brain feature lets every team member get their own slice of the brain, scoped by login. When you query, you only see what you’re allowed to see — never another person’s notes, never another team’s data.
Garry’s team fuzz-tested this across every read path (search, list, lookup, multi-source reads) and got zero leaks. This matters because Y Combinator just put company brain on its Request for Startups — and GBrain ships the production implementation.
The tutorial for setting up a multi-user, OAuth-scoped company brain takes about 90 minutes end-to-end. Each user authenticates, gets their own query scope, and the graph signals cross-source boost when corroborated information exists across team brains.
The Dream Cycle — Your Agent Gets Smarter While You Sleep
This is where GBrain feels genuinely futuristic. The dream cycle is a cron-driven enrichment pipeline that runs when you’re not using the brain. It handles:
- Deduping people pages — merging duplicate entries for the same person
- Fixing citations — correcting broken references across pages
- Scoring salience — promoting important pages, demoting stale ones
- Finding contradictions — surfacing conflicts between takes the agent has written
- Prepping tomorrow’s tasks — organizing what needs attention
Garry describes the effect simply: ‘My agent ingests meetings, emails, tweets, voice calls, and original ideas while I sleep. It enriches every person and company it encounters. It fixes its own citations and consolidates memory overnight. I wake up smarter than when I went to bed — and so will you.’
Schema Packs — Your Brain, Your Shape
Most knowledge tools force one fixed layout: their idea of ‘notes’ plus ‘people’ plus ‘tags.’ GBrain doesn’t have a fixed layout. It ships with bundled schema packs and lets you author your own when none fit.
The default schema pack includes 14 canonical types plus a catch-all: person, company, media, tweet, analysis, concept, deal, email, and more. You can detect your filesystem’s natural shape with gbrain schema detect, get LLM-refined proposals with gbrain schema suggest, and activate your custom pack with gbrain schema use my-pack.
What makes this powerful: the active pack threads through every read + write path. Page type inference, expert routing, fact extraction, and search caching all respect the schema. Switch packs and the brain re-interprets itself; switch back and nothing’s lost.
MCP Integration — 30+ Tools for Every AI Client
GBrain is built on the Model Context Protocol (MCP), the same open standard that powers tool integration across AI clients. It exposes 30+ tools over MCP, supporting both stdio and HTTP transports.
The setup snippets vary by client, but the pattern is always the same:
# Claude Code: one command
claude mcp add gbrain -- gbrain serve
# Remote brain with bearer token
gbrain connect https://your-host/mcp --token gbrain_xxx --install
# Perplexity with OAuth
gbrain connect https://your-host/mcp --agent perplexity --oauth --register
GBrain works with Claude Code, Codex, Cursor, Windsurf, Claude Desktop, Claude Cowork, Perplexity Computer, and ChatGPT. The HTTP server includes OAuth 2.1 with PKCE support, DCR-style client registration, scope-gated read/write/admin access, and rate limiting.
Getting Started
You need Bun (or Node.js 22+ with bun install -g). The quickest path to a working brain:
bun install -g github:garrytan/gbrain
gbrain init --pglite
gbrain doctor
Once the health checks pass, import your existing markdown notes, connect your coding agent via MCP, and start querying. The gbrain think command is where the magic happens — it runs retrieval, synthesizes an answer, and tells you what it doesn’t know.
For coding agents, the recommended workflow is the brain-first protocol: before any external API call, check the brain. The cheapest, fastest, most personal information source you have is the knowledge you’ve already captured.
Conclusion
GBrain is not just another personal knowledge management tool. It’s a production-grade brain layer built by the CEO of Y Combinator to solve his own scaling problem — and it shows in every design decision.
The synthesis layer with gap analysis, the self-wiring knowledge graph with +31.4 P@5 over vector-only RAG, the company brain with OAuth scoping, the dream cycle that enriches overnight, the schema packs that let your brain evolve its own shape — these are not incremental features. They represent a fundamentally different philosophy about what an AI knowledge system should be.
Search delivers pages. GBrain delivers answers — and honest ones at that, gaps included.
The project is MIT-licensed, written in TypeScript, and available now at github.com/garrytan/gbrain.