GBrain — 给 AI Agent 装上记忆大脑,自建知识图谱+RAG 混合检索
文章目录
- GBrain gives your AI agent a persistent, enrichable memory. It wires itself as you use it: every page write automatically extracts entity references and creates typed links (attended, works_at, invested_in, founded, advises) with no LLM calls. It runs a hybrid search combining vector similarity, BM25, and graph-boosted ranking. The result is a brain that knows not just what you said, but who you talked about and how they're connected. Built by Garry Tan (President & CEO of Y Combinator) to run his own AI agents in production. In just 12 days, it accumulated 17,888 pages, 4,383 people, 723 companies, with 21 cron jobs running autonomously. GBrain ships 34 skills, installs in ~30 minutes, and uses PGLite (no server needed) — you just answer questions about your API keys.
- Hybrid Graph + Vector Retrieval: GBrain benchmarks at P@5 49.1%, R@5 97.9% on a 240-page Opus-generated corpus — beating its own graph-disabled variant by +31.4 points P@5, and significantly outperforming ripgrep-BM25 + vector-only RAG baselines. 14 Embedding Provider Recipes: OpenAI is the default, but GBrain ships with Voyage, Google Gemini, Azure OpenAI, MiniMax, Alibaba DashScope, Zhipu, Ollama (local), llama.cpp llama-server (local), LiteLLM proxy, and more. Run gbrain providers list or gbrain doctor. Self-Repair & Overnight Consolidation: GBrain fixes its own citations and consolidates memory overnight. The agent ingests meetings, emails, tweets, voice calls, and ideas while you sleep — you wake up with a smarter brain.
-
- Community contributor @McoreD opened a follow-up after testing the MiniMax integration in a downstream fork: "I tested this from a fresh user perspective and followed the documented MiniMax setup as implemented in the code. The code defaults in provider-config.ts appear to match those values, so on the surface the setup looks correct. The problem is that, in practice, this still does not feel reliably usable end to end." Contributor @cacity addressed this with follow-up fixes — passing MINIMAX_GROUP_ID through config/init, switching to the api.minimax.chat endpoint, including GroupId in embedding requests, and adding MiniMax-specific retry handling for rate-limit responses: "Added another follow-up pass on the MiniMax path — default gbrain embed --all to serial page work when the embedding provider is MiniMax. Added MiniMax-specific request spacing and retry handling for rate-limit-style API responses."
- While technically from MemPalace (a competitor in the AI memory space), the discussion is directly relevant to understanding what separates credible AI memory systems from hype. Contributor @akarnokd did a thorough teardown: "This is golden! It's wild how a project can gain thousands of stars purely on hype and 'Readme-Driven Development' while the actual codebase is basically regex and unverified claims. The 96.6% to 84.2% AAAK drop measured on LongMemEval is a clean refutation of the '30x lossless compression, any LLM reads natively' claim." Meanwhile, @psinetron added: "This is the exact kind of reality check the AI community needs right now. Thanks for saving everyone a ton of time and exposing the actual state of this repository." This highlights exactly why GBrain's published benchmark numbers (P@5 49.1%, R@5 97.9%) and its open gbrain-evals repo matter — verifiable, reproducible evaluation is what separates credible AI memory systems from marketing-driven ones.
- GBrain is a serious, production-grade AI memory system that goes beyond simple vector stores. Its hybrid graph + vector approach, self-wiring entity extraction, and support for 14 embedding providers make it one of the most flexible open-source agent brain solutions available. With active community contributions and reproducible benchmarks, it's a project worth watching. ★ 14,636 stars ƃ TypeScript ƃ 330+ open issues ƃ Created April 2026 🔗 github.com/garrytan/gbrain — @garrytan
GitHub has seen no shortage of "AI memory" tools lately — but most are either black-box APIs you have to trust, or simple vector stores that can't handle complex queries. GBrain (garrytan/gbrain) takes a fundamentally different approach: a self-wiring knowledge graph built directly into your AI agent's workflow, with zero LLM calls for entity extraction.
GBrain gives your AI agent a persistent, enrichable memory. It wires itself as you use it: every page write automatically extracts entity references and creates typed links (attended, works_at, invested_in, founded, advises) with no LLM calls. It runs a hybrid search combining vector similarity, BM25, and graph-boosted ranking. The result is a brain that knows not just what you said, but who you talked about and how they're connected.
Built by Garry Tan (President & CEO of Y Combinator) to run his own AI agents in production. In just 12 days, it accumulated 17,888 pages, 4,383 people, 723 companies, with 21 cron jobs running autonomously. GBrain ships 34 skills, installs in ~30 minutes, and uses PGLite (no server needed) — you just answer questions about your API keys.
- Hybrid Graph + Vector Retrieval: GBrain benchmarks at P@5 49.1%, R@5 97.9% on a 240-page Opus-generated corpus — beating its own graph-disabled variant by +31.4 points P@5, and significantly outperforming ripgrep-BM25 + vector-only RAG baselines.
- 14 Embedding Provider Recipes: OpenAI is the default, but GBrain ships with Voyage, Google Gemini, Azure OpenAI, MiniMax, Alibaba DashScope, Zhipu, Ollama (local), llama.cpp llama-server (local), LiteLLM proxy, and more. Run
gbrain providers list or gbrain doctor.
- Self-Repair & Overnight Consolidation: GBrain fixes its own citations and consolidates memory overnight. The agent ingests meetings, emails, tweets, voice calls, and ideas while you sleep — you wake up with a smarter brain.
gbrain providers list or gbrain doctor.Community contributor @McoreD opened a follow-up after testing the MiniMax integration in a downstream fork:
"I tested this from a fresh user perspective and followed the documented MiniMax setup as implemented in the code. The code defaults in
provider-config.tsappear to match those values, so on the surface the setup looks correct. The problem is that, in practice, this still does not feel reliably usable end to end."
Contributor @cacity addressed this with follow-up fixes — passing MINIMAX_GROUP_ID through config/init, switching to the api.minimax.chat endpoint, including GroupId in embedding requests, and adding MiniMax-specific retry handling for rate-limit responses:
"Added another follow-up pass on the MiniMax path — default
gbrain embed --allto serial page work when the embedding provider is MiniMax. Added MiniMax-specific request spacing and retry handling for rate-limit-style API responses."
While technically from MemPalace (a competitor in the AI memory space), the discussion is directly relevant to understanding what separates credible AI memory systems from hype. Contributor @akarnokd did a thorough teardown:
"This is golden! It's wild how a project can gain thousands of stars purely on hype and 'Readme-Driven Development' while the actual codebase is basically regex and unverified claims. The 96.6% to 84.2% AAAK drop measured on LongMemEval is a clean refutation of the '30x lossless compression, any LLM reads natively' claim."
Meanwhile, @psinetron added:
"This is the exact kind of reality check the AI community needs right now. Thanks for saving everyone a ton of time and exposing the actual state of this repository."
This highlights exactly why GBrain's published benchmark numbers (P@5 49.1%, R@5 97.9%) and its open gbrain-evals repo matter — verifiable, reproducible evaluation is what separates credible AI memory systems from marketing-driven ones.
GBrain is a serious, production-grade AI memory system that goes beyond simple vector stores. Its hybrid graph + vector approach, self-wiring entity extraction, and support for 14 embedding providers make it one of the most flexible open-source agent brain solutions available. With active community contributions and reproducible benchmarks, it's a project worth watching.
★ 14,636 stars ƃ TypeScript ƃ 330+ open issues ƃ Created April 2026
🔗 github.com/garrytan/gbrain — @garrytan