GBrain
Free
GBrain is a personal production-level AI memory system open sourced by Y Combinator President Garry Tan. It provides AI Agents with long-term memory, knowledge graph self-connection, hybrid search and automated enrichment capabilities. MIT license, supports three usage methods: CLI / MCP Server / Agent automatic installation.
GBrain
Core parameters and statistics
| Project | Details |
|---|---|
| Product Name | GBrain |
| Product Type | AI Agent Long Term Memory System |
| Delivery Form | CLI / MCP Server / Agent Skill |
| Open Source License | MIT |
| Current version | v0.42.62.0 |
| Warehouse Language | TypeScript (97.2%) |
| GitHub Stars | 26.6k |
| GitHub Forks | 3.8k |
| Contributors | 106 |
| Development Author | Garry Tan (President and CEO of Y Combinator) |
| Supported platforms | CLI (macOS/Linux/Windows), MCP (stdio/HTTP), Agent integration |
GBrain is not a SaaS tool in the traditional sense, but an open source memory layer system for AI Agents. It transforms scattered Markdown notes into a knowledge brain that can be searched by hybrids, traversed by inference graphs, and continuously enriched automatically, solving the core contradiction of "Agent loses his memory after completing the task".
User and market recognition
GBrain was personally developed by Y Combinator President Garry Tan and used in his personal production environment (OpenClaw / Hermes Agent deployment). It has a real-world verification data scale of 146,646 pages, 24,585 people, 5,339 companies, 66 scheduled tasks. As of July 2026, GitHub has received 26.6k Stars, 3.8k Forks, and 106 community contributors.
In the field of Agent memory systems, GBrain is the only known production-level solution that has been verified by the YC president’s daily actual combat. Its search accuracy (P@5 49.1%, R@5 97.9%) is +31.4 percentage points higher than that of pure vector RAG. There is a public reproducible evaluation benchmark warehouse (gbrain-evals).
Cost advantage
| Cost Dimension | Description |
|---|---|
| The software itself | MIT open source, completely free, no commercial use restrictions |
| Run locally | PGLite (embedded Postgres WASM) runs locally with zero configuration and zero service cost |
| Embed model | Default ZeroEntropy free quota, optional 16 embedding providers such as OpenAI / Voyage / Ollama |
| Cloud sync | Supabase Postgres (starting at $25/mo) for multi-device sync or team deployment |
| API Key | Need to configure OpenAI (embedded), Anthropic (optional sub-Agent), Groq (voice transcription), etc. |
| Computing cost | Deterministic background queue (Minions) with zero Token cost, judgmental work calls LLM on demand |
The Free Truth: The software itself is free, but it requires its own API Key to run. Default embedding uses ZeroEntropy (free credits included), large-scale production deployment requires a Supabase subscription or self-hosted Postgres. Unlike SaaS tools, GBrain's cost structure is "open source software free + infrastructure pay-as-you-go".
Main functions
- Hybrid Search: Vector (pgvector HNSW) + BM25 keywords + Reciprocal Ranked Fusion (RRF) + Source-level weighting + Intent-aware query rewriting. Three search modes (conservative/balanced/tokenmax) switch cost/quality with one click. Recall@5 reaches 95%.
- Knowledge graph self-connection: After each page is written, the deterministic regular pipeline automatically extracts entity references (Markdown links + bare slugs), infers typed relationships (attended / works_at / invested_in / founded / advises), and completes deduplication, invalid link cleaning, and reverse link updating with zero LLM calls.
- Compiled Truth + Timeline dual-layer knowledge model: Each Markdown page is separated by
---into the upper layer Compiled Truth (current best understanding, continuously rewritten with new evidence) and the lower layer Timeline (the original evidence chain that is only appended but not deleted), allowing cognition to evolve while retaining a complete audit trail. - Minions background queue: Postgres native job queue, which separates deterministic work from judgmental work. Deterministic tasks are completed in an average of 753ms, with zero token cost and 100% success rate; judgmental tasks are executed asynchronously through sub-agents.
- 43 built-in Skills: covering signal capture, multi-source content ingestion (meeting/email/Twitter/PDF/video/GitHub), automatic entity enrichment, daily briefings, voice calls (Twilio + OpenAI Realtime), knowledge consistency inspection, reference repair, etc.
- MCP Server Access: Expose 30+ MCP tools through
gbrain serve, and can access mainstream MCP clients such as Claude Code / Cursor / Windsurf / Claude Desktop / Cowork / Perplexity / ChatGPT.
Model and version evolution
GBrain uses the MAJOR.MINOR.PATCH.MICRO four-segment version number, and the current version is v0.42.62.0. Core version context:
| Version | Time | Changes |
|---|---|---|
| v0.1.0 | ~2026-04 | Initial version, Postgres native knowledge brain infrastructure |
| v0.3.0 | ~2026-04 | Contract-first architecture + ClawHub plug-in system |
| v0.10.3 | ~2026-05 | Knowledge graph self-connection function is online |
| v0.12.0 | ~2026-05 | Zero LLM calls knowledge graph self-connection + hybrid search |
| v0.35.1.0 | ~2026-05 | Evaluation Baseline Version |
| v0.40.7.0 | ~2026-06 | Agent self-evolving Schema capabilities |
| v0.41.22 | ~2026-06 | gbrain-base-v2 15 type specification taxonomy |
| v0.42.62.0 | ~2026-07 | Synchronous filtering, dependency security fixes, search optimization |
For detailed version log, see the warehouse CHANGELOG.md.
Technical advantages
Three-layer separation architecture: GBrain adopts the separation architecture of Brain Repo (Git-hosted Markdown file, the only data source that is human-readable and editable) → GBrain retrieval layer (Postgres + pgvector hybrid search engine) → AI Agent (43 Skills define reading and writing logic). Agent reads and writes through the BrainEngine interface, and the underlying layer supports bidirectional live migration of PGLite (embedded Postgres, zero configuration) and PostgresEngine (Supabase).
Why search is faster and more accurate: Vector (HNSW on pgvector) + BM25 keywords + RRF fusion + source level weighting + intent-aware query rewriting, superimposed ZeroEntropy reranker. Each search can also be appended with graph signals - adjacency boosting if a result is a "hub node" for the query, cross-source boosting for cross-team brain results, and de-weighting of too many low-quality blocks in the same session. gbrain search --explain can view the score details of each stage.
Deterministic Cost Control: Separate deterministic work (regular extraction, link resolution, deduplication) from LLM judgmental work through Minions. Deterministic tasks use the Postgres native queue, with zero token cost and 100% success; only tasks such as enrichment and synthesis that require reasoning call LLM to avoid paying for reasoning fees for structured operations.
Compiled Truth + Timeline Cognitive Evolution: Different from pure coverage update (loss of history) or pure append (query noise), the two-layer model ensures both the latest and best understanding and a complete auditable evidence chain. The Agent can cite both conclusions and sources of evidence when answering.
How to use
| Entrance | Description |
|---|---|
| Agent automatic installation (recommended) | Paste the installation instructions in OpenClaw / Hermes Agent and complete the fully automatic deployment in 30 minutes |
| CLI standalone use | bun install -g github:garrytan/gbrain → gbrain init --pglite → gbrain import ~/notes/ → gbrain query "..." |
| MCP Server | Expose 30+ MCP tools locally through gbrain serve and access Claude Code/Cursor/Windsurf; remotely deploy Supabase and access Claude Desktop through ngrok |
| Claude Code / Codex quick access | gbrain init --pglite + claude mcp add gbrain -- gbrain serve |
Typical process:
- Paste the installation instructions in the Agent or install GBrain through CLI
gbrain init --pgliteinitializes the local brain in 2 secondsgbrain import ~/notes/Import Markdown notes- Agent automatically identifies and loads 43 Skills and configures scheduled tasks
- Use
gbrain query "..."or query through MCP client
Product Pricing
| Tier | Fees | Description |
|---|---|---|
| Open source software | Free | MIT license, available for commercial use, modification, and redistribution |
| Runs locally | Free | PGLite runs locally with zero configuration, no server or Docker required |
| Embed model | Pay by API Key | Default ZeroEntropy (with free quota), 16 optional embedding providers |
| Cloud Sync | Starting at $25/month | Supabase Postgres subscription for multi-device sync or team deployment |
| API Key requirements | Bring your own | Requires OpenAI (embedded), Anthropic (optional sub-Agent), Groq (speech transcription), etc. |
GBrain is an open source project with no SaaS subscription fees. The cost of a production deployment is primarily embedded API call fees and optional cloud database hosting fees. Compared with commercial products with the same function (such as a personal knowledge base subscription + API call fee that requires $20-50/month), GBrain has zero cost at the software level, and the infrastructure is paid according to actual usage.
Application scenarios
- Investor/Founder Relationship Management: Automatically archive meetings, emails, and social updates, and generate the other party’s complete profile and historical interactions 30 seconds before the meeting. Garry Tan himself uses 3000+ connections to manage his YC portfolio.
- Personal Knowledge Base: Convert years of notes, articles, and ideas into a deducible knowledge graph, supporting queries such as "My views on something half a year ago." Manage 10,000+ file sizes.
- Research Automation: Automatically extract entities, establish references, and generate timelines after ingesting papers, reports, and videos to assist academic or industry research.
- Content Creation Assistance: Track the source of inspiration, automatically complete references, maintain the consistency of topic tags, and prevent the loss of information during the creation process.
- Team Shared Memory: Supports multi-user deployment with OAuth scope isolation. Each team member can only see the pages they are authorized to, with zero data leakage. "Company Brain" scenario suitable for teams of 10-50 people.
- Intelligent Schedule and Tasks: Automatically prepare meeting briefings every day, inspect expired pages, repair damaged references, and generate periodic reports.
Applicable people
- AI Agent users: Users who have already run AI Agents such as OpenClaw, Hermes, Claude Code, Codex, etc., and need the Agent to have long-term memory. This is the core target group of GBrain.
- Heavy personal knowledge management users: Individual users who have massive Markdown notes (Obsidian, etc.) and want to turn them into searchable and reasonable knowledge graphs instead of just file searches.
- VC/Investor: Investment institutions that need to manage a large number of contacts, transactions, and meeting records, and want Agent to automatically help with pre-meeting preparations and post-investment tracking.
- Developers and Open Source Enthusiasts: Technical users who have a preference for self-hosting, self-deployment, and open source solutions and are willing to configure API Keys and infrastructure by themselves.
Not suitable for the crowd:
- Users who don't want to manage API Keys or infrastructure themselves - this is not a SaaS out of the box and will need to configure the LLM API and database themselves.
- Users who only need simple note search - GBrain's learning curve and deployment complexity are excessive for users with only basic note query needs.
- Users who have extreme requirements for data privacy but do not want to self-host - although local running (PGLite) is supported, multi-device synchronization requires a cloud database.
- Scenarios with mainly non-English content and requiring in-depth Chinese word segmentation - GBrain's FTS uses the English stemmer by default, and Chinese support requires additional configuration (such as jieba word segmentation expansion).
Summary and Outlook
The core competitiveness of GBrain is that it is not another note-taking application or vector database, but a memory layer truly designed for AI Agents: hybrid search + knowledge graph self-connection + deterministic background queue + 43 scalable Skills, allowing the Agent to evolve from "starting from scratch for each conversation" to "having an ever-growing knowledge brain." Its author Garry Tan’s YC President status and 140,000 pages of real-life verification give the product extremely high credibility. The open source MIT protocol also eliminates commercial adoption concerns.
Current limitations include: the CLI-based usage method has a high threshold for non-technical users; the orchestration method of community contributions (PR batch processing instead of real-time merging) may cause delays in the implementation of some fixes; the project iteration speed is extremely fast (it has reached v0.42+), and some functional stability is still in the rapid evolution period.
Procurement/Adoption Risk Assessment: As an open source project, GBrain does not have commercial SLA support, and critical production deployments need to rely on community or internal maintenance capabilities. API Key fees increase linearly with usage. It is recommended to use the default ZeroEntropy free quota to verify the effect before large-scale deployment. The project currently has a high single point risk - the core maintainer is only Garry Tan (although there are 106 contributors, most of them are community PRs). It is recommended to fork to back up critical versions and pay attention to changes in the project governance structure.
Related tools: CrewAI, langchain
Version Info
- v0.42.62.0 :Supports --src-subpath + --exclude synchronous filtering, fixes multiple dependency vulnerabilities and search optimization.
- eval-run-v0.35.1.0-baseline :Evaluation baseline version, used to retrieve quality evaluation baselines.
User Reviews