← all repositories
garrytan/gbrain

YC's CEO built himself a second brain, open-sourced it

A personal knowledge base that actually answers questions instead of dumping search results on you.

21.5k stars TypeScript AgentsRAG · Search
gbrain
Velocity · 7d
+338
★ / day
Trend
steady
star history

What it does

GBrain is a retrieval-and-synthesis layer for AI agents. Ingest your notes, meetings, emails, and tweets; query it with natural language; get back a written answer with citations, not a pile of raw chunks. It runs locally (PGLite, no Docker) or scales to Postgres, and plugs into Claude Code, Codex, Cursor, and others via MCP.

The interesting bit

The “gap analysis.” Every synthesized answer ends with an explicit admission of what the brain doesn’t know — stale data, missing replies, blind spots. It’s the rare knowledge tool that tells you when it’s guessing. The self-wiring knowledge graph (typed edges like works_at, invested_in) is extracted without LLM calls, which keeps it fast and cheap.

Key highlights

  • Two query modes: gbrain search for fast hybrid retrieval; gbrain think for synthesized, cited prose with gap analysis.
  • Zero-LLM knowledge graph: entity extraction and typed edges happen on write, not on query.
  • Company-brain mode: per-user scoping with fuzz-tested access controls; YC’s current RFS shape.
  • Autonomous “dream cycle”: overnight enrichment, citation fixing, and memory consolidation via cron jobs.
  • Benchmarked: +31.4 P@5 over graph-disabled and vector-only RAG on a 240-page corpus (evals in sibling repo).

Caveats

  • The README is bullish on “30 minutes to install” but the actual path depends on wrangling API keys and choosing between OpenClaw, Hermes, or manual CLI setup.
  • Company-brain scoping is claimed leak-free, but the source is the author’s own fuzz tests — no third-party audit mentioned.

Verdict

Grab this if you’re already running Claude Code or Codex and want your coding agent to stop forgetting everything outside the current chat. Skip it if you’re hoping for a polished SaaS; it’s a self-hosted daemon that expects you to feed and tend it.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.