← all repositories
garrytan/gbrain

An agent brain that synthesizes answers while you sleep

GBrain gives AI agents a persistent memory, synthesizing cited answers from your notes and wiring a knowledge graph autonomously while you sleep.

26.9k stars TypeScript AgentsRAG · Search
gbrain
Velocity · 7d
+78
★ / day
Trend
cooling
star history

What it does

GBrain ingests your scattered data—meetings, emails, tweets, voice calls—and sits between your raw notes and your AI agent. It answers natural-language questions with synthesized prose, explicit citations, and a candid note about what it doesn’t know, rather than dumping a list of relevant pages. It also runs a continuous “dream cycle” to enrich entities, fix citations, and consolidate memory autonomously. You can deploy it as a personal brain or scope it per-user as a shared company memory.

The interesting bit

The standout trick is a self-wiring knowledge graph that extracts typed relationships—like works_at or invested_in—from every page write with zero LLM calls. On a 240-page benchmark corpus, enabling this graph boosted precision at 5 by 31.4 points over vector-only search. That gap-analysis feature, where the brain explicitly tells you what information is stale or missing, is the kind of honesty most RAG systems skip.

Key highlights

  • Synthesizes cited answers with explicit gap analysis instead of returning raw page chunks.
  • Self-wiring knowledge graph extracts entities and typed edges without calling an LLM.
  • Runs a 24/7 autonomous “dream cycle” to ingest, enrich, and consolidate memory overnight.
  • Supports multi-user company brains with login-scoped access controls and zero-leak fuzz testing.
  • Ships as an MCP server for Claude Code, Codex, Cursor, and others; runs fully local with PGLite or scales to Postgres/Supabase.

Verdict

Developers running persistent AI agents—or teams tired of context loss in Claude Code and Codex—should look here. If you just need occasional keyword search across a few markdown files, it’s probably overkill.

Frequently asked

What is garrytan/gbrain?
GBrain gives AI agents a persistent memory, synthesizing cited answers from your notes and wiring a knowledge graph autonomously while you sleep.
Is gbrain open source?
Yes — garrytan/gbrain is open source, released under the MIT license.
What language is gbrain written in?
garrytan/gbrain is primarily written in TypeScript.
How popular is gbrain?
garrytan/gbrain has 26.9k stars on GitHub and is currently cooling off.
Where can I find gbrain?
garrytan/gbrain is on GitHub at https://github.com/garrytan/gbrain.

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