GBrain · Garry Tan · MCP · Sovereign Brain · 2026

GBrain: self-hosted AI memory for Claude, ChatGPT & Gemini

The open-source AI brain released by Y Combinator's CEO — and the sovereign brain I built on top of it: one memory, in my own cloud, with six doors. Three AIs from three rival companies, two production agents and a human chat, all reading and writing the same memory. Mine. Video in Spanish with English subtitles.

The real problem

Your AIs already have memory. The question is different: do you control that memory?

The AI tool you use today is disposable: a better one ships tomorrow and you switch without a second thought. What doesn't get replaced is your memory — everything the AI learned about you. And that memory, today, lives in someone else's hands. It's not a technical problem, it's a business one: they're competitors, and the more memory you pile into their box, the harder it is to leave. That's the leash.

Black box

You can't see what it noted about you, you can't edit it, it saves what it decides. The memory exists — but you can't open it.

Inconsistent

Sometimes it remembers, sometimes it ignores what it saved. You never quite know what it stored or when it will use it.

Siloed

What you taught Claude, neither ChatGPT nor Gemini knows. Every tool keeps its own box and lends it to no one.

Not portable

Switch tools — or move to an open-source model — and you start from zero. You explain everything all over again.

The result is the re-explaining loop: you tell one AI about your project, your stack, how you work. An hour later you need another one, and you explain exactly the same thing, from zero. The way out isn't a better memory per tool — it's taking the memory out of their boxes and putting it in a single box that's yours.

What is GBrain: the engine

GBrain is an open-source AI brain (MIT) released by Garry Tan, president and CEO of Y Combinator — the accelerator behind Airbnb, Stripe and Dropbox. He built it for his own agents: a production brain with over 140,000 pages that ingests his meetings, emails and notes while he sleeps.

"Search gives you raw pages. GBrain gives you the answer."

— Garry Tan, official GBrain README

Synthesis, not links

It doesn't return "10 pages that mention your query". It composes the answer in prose, with citations to the sources, and explicitly tells you what it does NOT know yet (gap analysis).

A self-wiring graph

Every write extracts entities and creates typed edges (works_at, invested_in, attended) with zero LLM calls. It answers questions vector search alone can't reach.

MCP native

It exposes 30+ tools over MCP: stdio for local use, and HTTP with OAuth 2.1, client registration and scope-gated permissions (read / write / admin) for remote access.

Your files are the truth

The brain lives as markdown in a git repo you own. The database isn't backed up — it's rebuilt from your files. Delete the database, and the brain is reborn.

But pay attention, because this is the point of the video: GBrain is the engine. One piece. Everything that follows — the six doors, the production agents, the governance, the cloud — is the harness I built on top. Garry Tan released the seed; the sovereign system is mine. And that's exactly the point: the engine can come from anyone. The harness is yours.

One memory, many doors

The idea that ties everything together. The point isn't owning a brain — it's where you talk to it from. Six different doors talk to this brain, and when you change something through one, it appears in all the others. Instantly.

   Claude Code        ChatGPT        Antigravity CLI
        \                 |                 /
         ═══════════  THE BRAIN  ═══════════
        /                 |                 \
Investigator · Chronicler |         Otto (Google Chat)
 (ADK agents, Cloud Run)  |            (any person)

Doors 1–3

Three rival companies

Claude (Anthropic), ChatGPT (OpenAI) and Antigravity (Google) — all three connected to the same URL, without knowing about each other.

Doors 4–5

Production agents

The Investigator and the Chronicler: ADK agents deployed on Cloud Run that work on their own and write into the brain, coordinated over A2A.

Door 6

A human chat

Otto, in Google Chat — for people who don't even know what a terminal is. Anyone writes, and the brain answers.

Six are the ones I built — they could be any you want. Any tool that speaks MCP is one more door. And the subtle part: since the memory doesn't depend on the model, you mix and match the model per door — a powerful one where you truly need it, a cheap or open-source one for the routine work. You pick the model by task and by cost; the memory is always the same. Yours.

The architecture: memory as a governed service

Five layers, bottom to top. And three things that break intuition.

0

Layer 0 · Files

The truth lives in your files, in git. Everything else is rebuilt from here.

1

Layer 1 · Engine

One brain running 24/7 on your infrastructure: one server, N doors.

2

Layer 2 · Intelligence

Search by meaning, reason over what's stored, and detect what's missing.

3

Layer 3 · Door

One identity per agent. Every AI that connects gets its own credential — revocable.

4

Layer 4 · Governance

Who can read and who can write what. You grant the permissions — and you take them away.

Files go at the bottom

The database isn't backed up: it's rebuilt from your files in git. The database is a replaceable employee; your files are the company.

The brain reasons

It doesn't just store and recall. Ask it about an incident and it gives you the root cause citing sources — and tells you what it doesn't know. For pennies, not a fortune.

Governance is the hard part

Wiring AIs to a database is plumbing. The hard part is who writes where when three rival AIs touch the same memory. That's controlled with identity and per-door permissions.

Governance: the URL is not the key

The layer almost nobody builds. Every door has its own identity with read and write permissions — and the full cycle is governed live: connect, grant, revoke.

1

Connect

You register a new AI and choose what it can do. Leave it with no permissions and it connects, authenticates — and bounces. Having your brain's address is worth nothing to anyone.

2

Grant

One read checkbox and the AI can read. Another for write and it writes too. Permission is per door, not global.

3

Revoke

One button and that AI is out, live, without touching its machine. The other five doors keep working without ever noticing.

The principle

You don't ask the AI to behave — you control its capability. In the video I cut off one of the three AIs live, without touching its machine, and the others never notice. That doesn't exist when your memory is a shared file.

Two worlds: interactive and production agents

Everything above is interactive agents: you talk to them, they answer. But there's another world — production agents, the ones running alone in the cloud with nobody watching. And the closer: a non-technical human triggers them from a chat, without knowing they exist.

1

A human writes in Google Chat

The boss — who isn't technical — asks Otto, the company assistant, for something. He has no idea what's behind it.

2

The Investigator queries the brain

An ADK agent on Cloud Run searches the memory, reasons out the root cause, and cites its sources.

3

It delegates via A2A to the Chronicler

The Agent2Agent protocol hands the work to a second agent, also running in production.

4

The Chronicler writes the report

It lands in the brain, with wikilinks and the agent's signature. With nobody watching.

5

Every door reads it

The report instantly appears in Claude, ChatGPT, Antigravity and the wiki. One single memory.

Agents from another company (Google), speaking three protocols — MCP, A2A and OAuth — over the same brain the terminals read. The deployment pattern is the one from ADK on Cloud Run ›

Day 30: the three real failures

One question separates hype from a system: what happens on day thirty? These are the times this broke while I was building it — because they teach more than any perfect demo.

The invisible lock

The agents read perfectly, but when writing they answered "done" — and saved nothing. The credential wasn't traveling when the session opened. Lesson: an agent saying "I did it" doesn't mean it did. Verify.

The ghost I created

The agent wrote perfectly, but I swore it didn't. Hours hunting a bug that didn't exist: I had deleted a test page earlier, and soft-delete was masking my own reads. Lesson: half of your bugs are the way you're looking.

The free that costs you

I tried the reasoning layer with a provider's free model. It returned empty. I switched models, and for pennies it worked. "Free" sometimes gets paid in time.

An honest note, same as in the video: the demo company, Neiralabs, is fictional, with demo data. But the system is real, it runs in the cloud, and the failures were real.

"Thin Harness, Fat Skills": the thesis, signed three times

Inside the GBrain repo came Garry Tan's essays. One is called "Thin Harness, Fat Skills", and its central line is exactly this channel's thesis: the secret is not the model, it's the harness — what wraps the model.

Three voices, one conclusion

This channel, months ago: "What changed? Not the model… the harness changed."

The creator of MCP: uses the term "agent harness" to name the layer that matters.

Y Combinator's CEO: signs it in the GBrain essays. The same conclusion, three times, from three different directions.

The model is the employee. The memory is the company. Don't give the company away. The full discipline behind this idea is in Harness Engineering ›

Sources

The official GBrain repository, its essays, and the standard that makes the doors possible.

Garry Tan · 2026

GBrain — the official repository

"Search gives you raw pages. GBrain gives you the answer." The complete code, MIT-licensed, with the ~30-minute install and the numbers from his own production brain.

Garry Tan · Ethos · 2026

"Thin Harness, Fat Skills" and the origin

The essays that shipped inside the repo: the secret is not the model, it's the harness that wraps it. Y Combinator's CEO signing this channel's thesis.

GBrain · Docs · 2026

INSTALL_FOR_AGENTS.md

GBrain is designed to be installed by your own agent: paste one URL into Claude Code or Codex and it does the work. Installation as a protocol, not a tutorial.

Model Context Protocol · 2026

MCP — the open standard

The protocol that turns any tool into one more door of the brain. A better AI ships tomorrow, you plug it in, and it already knows everything.

Related videos

This video is the channel's thesis taken all the way: the complete harness, built and running.

Claude Tag

The AI employee whose memory lives in Anthropic's house. This video is the answer to that catch — and the teaser's promise, fulfilled.

Harness Engineering

The thesis behind all of this: Agent = Model + Harness. Here the full harness gets built — and it's yours.

MCP in Production

The standard that makes the six doors possible: one URL, thirty tools, any client.

Claude Code Memory 2.0

Claude Code's automatic memory — powerful, but locked in its own box. The exact contrast with a brain of your own.

ADK on Cloud Run

How ADK agents deploy as A2A servers in production — the pattern the Investigator and the Chronicler use here.

Loop Engineering

Agents that run on their own, in a loop, without being called. Here they write into a brain that you read too.

Frequently asked questions

The essentials on GBrain and the sovereign brain.

What is GBrain?

+

GBrain is an open-source AI brain (MIT license) created by Garry Tan, the CEO of Y Combinator, to run his own agents. Its motto sums it up: "Search gives you raw pages. GBrain gives you the answer." Instead of returning links, it synthesizes a prose answer with citations to the sources and explicitly tells you what it doesn't know yet. It connects via MCP to Claude Code, ChatGPT, Gemini, Cursor and any compatible client.

Who created GBrain and why was it open-sourced?

+

It was built by Garry Tan, president and CEO of Y Combinator (the accelerator behind Airbnb, Stripe and Dropbox), as the production brain for his own agents: over 140,000 pages ingesting his meetings, emails and notes while he sleeps. He released it complete and free so others can build on the same foundation. Inside the repo came his essays — one is called "Thin Harness, Fat Skills": the secret is not the model, it's the harness that wraps it.

Is GBrain free?

+

The code is open source under the MIT license: complete and free. Running it costs whatever your infrastructure costs — and that can be almost nothing: it runs locally with PGLite, no server and no Docker, or on Postgres/Supabase at scale. The reasoning layer uses a language model that costs pennies per query. In the video, the complete brain with its database uses under 200 MB of RAM, on a free-tier machine.

How does GBrain connect to Claude, ChatGPT or Gemini?

+

Through MCP, the open connectivity standard for agents. GBrain exposes 30+ tools: locally over stdio with a single command in Claude Code; remotely over HTTP with OAuth 2.1, client registration and scope-gated permissions. Each AI connects to the same URL as one more door, with its own identity — and what one writes, all of them read instantly.

What is a sovereign AI brain?

+

It's what I call the complete system in the video: a memory that lives on infrastructure you own, whose source of truth is your files in git (the database is rebuilt from them), and which your AIs enter as visitors with permissions you grant and revoke door by door. GBrain is the engine; the sovereign brain is the whole harness around it: the six doors, the production agents, the governance and the cloud.

Does GBrain replace ChatGPT's or Claude's memory?

+

It inverts it. Today every tool keeps its own memory, locked in its own box and lent to no one — on purpose, because that accumulated memory is what makes switching hard. With a brain of your own it's the other way around: one single memory, yours, that every tool reads and writes. Note something through one door and it appears in all of them. And if a better tool ships tomorrow, you plug it in and it already knows everything.

What do I need to build something like this?

+

Less than it seems. GBrain installs in about 30 minutes and is designed to be installed by your own agent: paste the INSTALL_FOR_AGENTS.md URL into Claude Code or Codex and it does the work. The system in the video adds the architecture around it: a small cloud machine, a secure tunnel with zero open ports, Docker, and the doors connected over MCP. You don't need powerful hardware.

Where is the complete step-by-step?

+

The video shows the living system — the concept and the real demos, failures included. The detailed blueprint to build it (infrastructure as code, the tunnel, the permissions, the production agents) lives in my Agentic Engineers community, step by step, so you can build it in a weekend without repeating my mistakes.

Community

The complete sovereign brain blueprint — in Agentic Engineers

The detailed step-by-step to build it in a weekend: infrastructure as code, the secure tunnel, the MCP doors, the permissions and the production agents — without repeating my mistakes. Free access to the community; full courses live in the Premium tier.

Join Agentic Engineers →

YouTube channel

@NicolasNeiraGarcia

ADK · A2A · Claude Code · Automation · Infrastructure

Subscribe ›