AI INFRASTRUCTURE

GBrain: The Open-Source Memory Solution for AI Agents

Garry Tan's GBrain introduces an open-source solution for AI agents to retain memories across sessions. This guide details the installation and functionalities of GBrain, enhancing AI capabilities.

GBrain: The Open-Source Memory Solution for AI Agents
CoinSynaptic Desk
AI INFRASTRUCTURE · Correspondent
· PUBLISHED MAY 22, 2026 · 2 MIN READ

Artificial intelligence often struggles with memory retention, with agents starting each session devoid of prior context. GBrain addresses this limitation with a novel open-source solution developed by Garry Tan, President and CEO of Y Combinator. Designed to enhance Tan's own AI deployments, including OpenClaw and Hermes, GBrain features a markdown-first, Postgres-backed knowledge layer that accumulates information from various sources, such as meetings, emails, tweets, and notes. Notably, it constructs a typed knowledge graph without relying on large language model (LLM) calls for graph extraction.

The production instance of GBrain currently boasts an extensive knowledge base, comprising 146,646 pages of content, 24,585 individuals, 5,339 companies, and 66 autonomous cron jobs. In performance benchmarks, GBrain shows impressive capabilities, achieving a P@5 score of 49.1% and an R@5 score of 97.9%, reflecting a 31.4-point improvement over the same codebase without the graph layer.

This article serves as a hands-on tutorial for those interested in implementing GBrain locally. Expect to complete the setup in about 20 minutes, from installation to running a search. The tutorial will walk through the installation of GBrain v0.38.2.0, allowing users to import a small folder of notes and see the automatic wiring of the knowledge graph. The GBrain repository is openly accessible under an MIT license at github.com/garrytan/gbrain.

Key Features of GBrain

GBrain offers a variety of functionalities that enhance the capabilities of AI agents. By the end of the tutorial, participants will establish:

  • A local database using embedded Postgres 17, which operates with zero server configuration.
  • A repository of markdown notes containing information on individuals, companies, and various concepts.
  • A hybrid-search command-line interface that employs a combination of vector, BM25 keyword, and Reciprocal Rank Fusion (RRF) methodologies, along with a default ZeroEntropy reranker.
  • An automatically extracted typed knowledge graph that includes connections like works_at, founded, invested_in, attended, advises, and mentions.
  • An MCP server that provides access to 74 tools, enabling integration with Claude Code, Cursor, and Windsurf for direct interaction with the knowledge base.
See also  Fireblocks Launches Agentic Payments Suite, Joins x402 Foundation

Installation Requirements

To install GBrain, users will need a compatible operating system, either macOS or Linux (Windows users can utilize WSL2). The minimum runtime requirement is Bun version 1.3.10, which can be easily installed as detailed in the tutorial. Once the prerequisites are met, users can configure their embedding model by setting an API key and executing the necessary commands to embed and query the knowledge graph.

GBrain creates a coherent memory structure for AI agents, enhancing their utility in real-world applications. Its open-source nature invites developers and researchers to explore its capabilities further and potentially contribute to its evolution.

As AI technologies advance, memory management will become increasingly significant. GBrain represents a step toward more intelligent and context-aware AI agents, paving the way for future developments in this essential area. By establishing structured memory, GBrain not only boosts the performance of existing AI frameworks but also sets a precedent for designing future AI systems that can learn and adapt over time, ultimately becoming more effective in their tasks.

CoinSynaptic Desk

AI Infrastructure · 2,198 stories

CoinSynaptic Desk covers the intersection of artificial intelligence and decentralized networks — frontier AI infrastructure, crypto-native AI agents, Bittensor subnets, DePIN economies, and tokenized compute.

THE DAILY SIGNAL

The stories that move AI & crypto markets — before the market reacts.

Free. 7am ET. Five stories. 62,400 readers.