DESK · THEORY
ExplainerAdvanced · June 2, 2026 · 5 min read
On this page

What is gbrain?

A memory layer for your AI agent, open-sourced by the CEO of Y Combinator. It is the fix for the thing that quietly breaks every agent: it forgets.

My agent made a decision with me on a Tuesday. By Thursday it had forgotten we ever spoke. So I re-explained the whole context, again, the way you re-explain things to a brilliant employee with no short-term memory. That is the daily tax of running an agent. gbrain is the most credible open-source attempt yet to erase it.

What it is

gbrain is a "brain" for your agent: a memory and knowledge system that lets an OpenCLAW or Hermes agent (or your coding agent) actually remember who you are, what you decided, and who everyone in your world is, across every session.

It was built and open-sourced in April 2026 by Garry Tan, the president and CEO of Y Combinator, the accelerator behind Stripe, Airbnb, and Coinbase. This is not a weekend demo. Tan runs it as his own production setup, it is free and MIT-licensed (use it, fork it, modify it), and it blew past 20,000 GitHub stars in its first two months. When the person who has watched more startups get built than almost anyone alive open-sources his personal AI memory, it is worth ten minutes to understand what it does.

The core idea, in the project's own words: "Search gives you raw pages. gbrain gives you the answer." Most "search your notes" tools hand you ten links and make you do the reading. gbrain reads them for you and writes back a single answer, with a source behind every claim, plus an honest note on what it does not know yet.

Underneath, it is simpler than it sounds. Your knowledge lives as plain markdown files in an ordinary folder: your meetings, your decisions, a page per person and per company. gbrain indexes all of it so the agent can find anything by meaning, not just by keyword. That part is RAG, the standard pattern for putting AI on top of your own data. Then it adds the trick that makes it special: it quietly wires those notes together into a web of connections (who works where, who introduced whom, which deal belongs to which company) so it can answer questions that span dozens of pages at once, not just one.

Why CEOs care

The chat-tab AI you use forgets everything the second you close it. So does your agent, by default. Every session starts from zero, and you pay the re-explaining tax five times a day. gbrain ends that. The agent shows up to every session already knowing your business.

Tan's own framing is the part operators should sit with: a big personal brain is a moat. The point of feeding years of meetings, decisions, and relationships into one queryable place is that nobody can copy it, and you stop re-deriving what you already know. Ask "what do I need to know before my call with Alice tomorrow?" and instead of five links you get a briefing: what Alice runs, what you last agreed, what is still open, and a flag that nothing's been added in six weeks so the picture may be stale. That last bit, the system telling you where its own knowledge is thin, is the thing almost every other AI tool refuses to do.

And it scales past you. Point it at a shared store instead of your laptop and it becomes a company brain: institutional memory the whole team can query, so context lives in the system instead of in the three people who happen to remember. It is free, open, and runs on your own hardware with your own keys. The most sensitive asset you own, which is everything you know, never gets handed to a vendor.

How it gets smarter while you sleep

The detail people remember about gbrain: it runs a nightly routine Tan calls the "dream cycle." On a schedule (a cron job), while you sleep, it cleans up the day's input. It merges the two notes that are secretly about the same person, repairs broken links, flags claims that contradict each other, and preps what you will need tomorrow.

Tan describes the result as waking up smarter than he went to bed. That is the shape of the whole tool: memory that maintains itself, instead of a notes folder that rots. A second brain that needed constant gardening would just be another chore you abandon by week three. One that gardens itself overnight is infrastructure.

Where you'll see it

What to do next

If you do not yet run an agent that could use a brain, start there: read What is OpenCLAW? and stand up the harness first, because gbrain is the memory you add to an agent, not a thing you run on its own. If you already run one, the move this week is to install gbrain on a folder of your real notes, wire it in over MCP, and ask it the one question you are always re-explaining. Watch the answer come back with a citation. Then tell me what it remembered that you had forgotten.

The Thursday 3

Get three workflows like this every Thursday

The Thursday 3 is a free weekly email. Three workflows that put you in the top 1% of CEOs. 90-second read. Every card links back to a step-by-step guide like this one.

Get the newsletter →
The Desk Theory books

The architecture behind this workflow.

Two operator manuals for the same job, run two ways: OpenCLAW for the always-on harness, Claude Code for the focused-work CLI. Pick one, or get the bundle for $149.

Browse the books · $99 each

Want one workflow like this taken apart end-to-end every week? The Tuesday Pro Deep Dive · $39/mo.