Garry Tan open-sourced GBrain, a memex tool that gives AI agents persistent long-term memory. The system uses markdown files in a git repo as its source of truth, backed by Postgres and pgvector for hybrid search. Tan built it after his personal AI assistant kept getting smarter the more context he fed it. Within a week, he had indexed 10,000 markdown files, 3,000 people profiles, and 13 years of calendar data.

The core idea is what Tan calls "compounding knowledge." Every time new information arrives, whether a meeting transcript or email, the agent detects entities, checks what the brain already knows, then updates relevant pages. A "Dream Cycle" runs overnight, enriching entity pages and fixing citations. Tan writes that he wakes up with a brain smarter than when he went to sleep. The production numbers back that up.

GBrain exposes 30 tools through the Model Context Protocol, so it works with Claude Code, Cursor, and Windsurf. It integrates directly with agents like OpenClaw and Nous Research's Hermes Agent. The architecture treats every page like an intelligence briefing: compiled facts on top that get rewritten as evidence changes, with an append-only timeline below that preserves the source trail. You can start with just markdown files and a git repo. Postgres becomes necessary once you hit thousands of files and grep stops cutting it.

Most AI agents today are stateless. They forget everything after each session. Tan is betting that the future runs the other way: agents that build and maintain knowledge about your life and work over time. GBrain is a working implementation of that idea, and it's free.