How GBrain Works, and How to Actually Wire It Into Your Agents
x.comAbout
@garrytan open-sourced his production AI infrastructure: 17,888 pages, 4,383 people dossiers, 723 companies. Here's the architecture. Garry Tan (President & CEO @ycombinator) made public 17,888 pages of his brain. His production system consists of 4,383 people dossiers, 723 companies, 21 autonomous cron jobs created within a span of 12 days. In the first 24 hours this was able to collect over 5,400+ GitHub stars. It’s a personal knowledge layer for AI agents. By default, all agents are stateless, that is each session begins blank. GBrain provides a structured, searchable long-term memory for each session using an embedded Postgres database and a git-tracked Markdown corpus. The agent uses the brain prior to answering questions and updates the knowledge base with new information following each session. The knowledge grows exponentially. MIT licensed. TypeScript, runs on Bun. v0.10.1. Repo snapshot Three-layer architecture Brain Repo: A git-backed directory of Markdown files, one per person, company, project, or idea. The repo is the system of record. Edit any file manually and gbrain sync picks up the changes. Tan's own instance includes 13 years of calendar data, 280+ meeting transcripts, and 300+ captured ideas. Retrieval Layer: Postgres with pgvector. The CLI and MCP server are both generated from a single contract-first interface (src/core/operations.ts, ~30 shared operations). Two pluggable engines: PGLite (embedded Postgres 17.5 via WASM, zero config, boots in 2 seconds) is the default. For corpora over 1,000 files, gbrain migrate --to supabase moves everything to a managed Postgres instance. Migration is bidirectional. Skills Layer: 25 Markdown skill files organized by RESOLVER.md. The architecture philosophy is "thin harness, fat skills": executable TypeScript handles deterministic operations (search, embed, import, sync). The agent model handles judgment-dependent tasks by reading the skill file and executing it. Skills are plain text and modifiabl
Comments
No comments yet.