Production-ready AI memory
Your AI agent is smart but forgetful. GBrain gives it a brain. The production memory powering real deployments: 17,888 pages, 4,383 people, 723 companies, 34 skills running autonomously.
Core capabilities
The agent ingests meetings, emails, tweets, voice calls, and original ideas while you sleep. It enriches every person and company it encounters. It fixes its own citations and consolidates memory overnight. You wake up and the brain is smarter than when you went to bed.
Vector + keyword + RRF fusion + multi-query expansion + 4-layer dedup. Keyword catches exact phrases. Vector catches conceptual matches. RRF gets both. Benchmarked: P@5 49.1%, R@5 97.9%.
Every page write extracts entity references and creates typed links (attended, works_at, invested_in, founded, advises) with zero LLM calls. Ask relational questions vector search alone cannot reach.
Always-on signal detection. Content ingestion for articles, media, meetings, voice. Research and synthesis. Brain operations. Durable minion orchestration. Operational cron scheduling and reports.
30+ MCP tools via stdio. Remote MCP with OAuth 2.1 and an embedded admin dashboard. Zero external infrastructure. Every major AI client connects, every request is scoped, every action is logged.
Call a phone number. Your AI answers. It knows who is calling, pulls their full context from the brain, and responds like someone who actually knows your world. The call ends, a brain page appears.
Durable, Postgres-native job queue. Deterministic background work survives crashes, streams progress, and costs $0.00 in tokens. 753ms wall time vs gateway timeout. 100% success rate.
The loop
The brain wires itself. The system gets smarter on its own. Every cycle adds knowledge.
Meeting, email, tweet, link, voice call
Captures ideas + entities in parallel
Checks the brain first before any API
Full context, every time
Typed relationships, zero LLM calls
Ready for the next query
Every page follows the compiled truth + timeline pattern. Above the fold: your current best understanding, rewritten when new evidence changes the picture. Below: an append-only evidence trail, never edited, only added to.
Pages are not just text. Every mention of a person, company, or concept becomes a typed link in a structured graph. The brain wires itself.
---
type: concept
title: Do Things That Don't Scale
tags: [startups, growth, pg-essay]
---
Paul Graham's argument that startups should do
unscalable things early on. The key insight: the
unscalable effort teaches you what users actually
want, which you can't learn any other way.
---
- 2013-07-01: Published on paulgraham.com
- 2024-11-15: Referenced in batch W25 kickoff talk
The 34 skills
GBrain ships 34 skills organized by a resolver. Skill files are code: fat markdown documents that encode entire workflows. The agent reads the skill and executes it.
System design
The repo is the system of record. GBrain is the retrieval layer. The agent reads and writes through both. Human always wins — edit any markdown file and sync picks up the changes.
Markdown files = source of truth. Human can always read and edit. Git-tracked. db_only and db_tracked tiering for bulk content.
Postgres + pgvector. Hybrid search (vector + keyword + RRF). Graph traversal via recursive CTE. Embedded OAuth 2.1 admin dashboard.
29+ skills define HOW to use the brain. RESOLVER.md routes intent to skill. Agent reads skills and executes workflows.
The brain isn't one trick. Every retrieval question goes through ~20 deterministic techniques layered together. No single one is magic; the win comes from stacking them so each layer covers what the others miss.
| Metric | Before PR #188 | After PR #188 | Delta |
|---|---|---|---|
| Precision@5 | 39.2% | 44.7% | +5.4 pts |
| Recall@5 | 83.1% | 94.6% | +11.5 pts |
| Correct in top-5 | 217 | 247 | +30 |
| Graph-only F1 (ablation) | 57.8% (grep) | 86.6% | +28.8 pts |
Database ready in 2 seconds. PGLite, no server. You just answer questions about API keys.
git clone https://github.com/garrytan/gbrain.git && cd gbrain && bun install && bun link
gbrain init # local brain, ready in 2 seconds
gbrain import ~/notes/ # index your markdown
gbrain query "what themes show up across my notes?"
FAQ
GBrain is a knowledge graph and memory system for AI agents. It gives your agent a durable brain that ingests meetings, emails, tweets, voice calls, and original ideas — then enriches every person and company it encounters.
About 30 minutes. The database (PGLite) is ready in 2 seconds. The agent clones the repo, installs GBrain, sets up the brain, loads 34 skills, and configures recurring jobs. You answer a few questions about API keys.
Yes. GBrain works as a standalone CLI. Use gbrain init for a local brain, gbrain import to index your markdown, and gbrain query to search. MCP server mode is available for Claude Code, Cursor, and Windsurf.
Every time a page is written, GBrain extracts entity references and infers typed links (attended, works_at, invested_in, founded, advises) with zero LLM calls. Backlinks rank well-connected entities higher in search.
Minions is a durable, Postgres-native job queue for deterministic background work. It survives crashes, streams progress, and costs $0.00 in tokens. 753ms wall time vs gateway timeout for sub-agents.
Your brain repo is your system of record. You control where it lives. GBrain supports local PGLite (no external server) or self-hosted Supabase. OAuth 2.1 scopes every request. No data leaves your infrastructure unless you configure integrations.