Production-ready AI memory

Give Your AI Agent a Brain

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.

17,888 Pages
4,383 People
723 Companies
34 Skills

What GBrain does

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.

Hybrid Search

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%.

Self-Wiring Knowledge Graph

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.

34 Skills

Always-on signal detection. Content ingestion for articles, media, meetings, voice. Research and synthesis. Brain operations. Durable minion orchestration. Operational cron scheduling and reports.

MCP Server

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.

Voice-to-Brain

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.

Minions

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.

How It Works

The brain wires itself. The system gets smarter on its own. Every cycle adds knowledge.

1

Signal Arrives

Meeting, email, tweet, link, voice call

2

Signal Detector

Captures ideas + entities in parallel

3

Brain-Ops

Checks the brain first before any API

4

Respond

Full context, every time

5

Auto-Link

Typed relationships, zero LLM calls

6

Sync & Index

Ready for the next query

The Knowledge Model

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

Skills That Ship

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.

Always-on

  • signal-detector — Fires on every message. Captures original thinking and entity mentions.
  • brain-ops — Brain-first lookup before any external API.

Content Ingestion

  • ingest — Thin router. Detects input type and delegates.
  • idea-ingest — Links, articles, tweets become brain pages.
  • media-ingest — Video, audio, PDF, books, screenshots, repos.
  • meeting-ingestion — Transcripts with attendee enrichment.
  • voice-note-ingest — Exact phrasing preserved, never paraphrased.
  • article-enrichment — Structured pages with summary and quotes.

Research & Synthesis

  • book-mirror — Two-column chapter-by-chapter analysis.
  • strategic-reading — Read through a specific problem-lens.
  • concept-synthesis — Deduplicate concept stubs into a tiered map.
  • perplexity-research — Brain-augmented web research.
  • archive-crawler — Universal archivist for personal file dumps.
  • academic-verify — Trace research claims to replication.
  • brain-pdf — Render any brain page to publication-quality PDF.

Brain Operations

  • enrich — Tiered person/company enrichment with timelines.
  • query — 3-layer search with synthesis and citations.
  • maintain — Stale pages, orphans, dead links, citation audit.
  • citation-fixer — Scans and fixes missing or malformed citations.
  • repo-architecture — Decision protocol for where brain files go.
  • publish — Share brain pages as password-protected HTML.
  • data-research — Structured data extraction from email.

Operational

  • daily-task-manager — Task lifecycle with P0-P3 priority levels.
  • daily-task-prep — Morning prep with calendar lookahead.
  • cron-scheduler — Timezone-aware scheduling with idempotency.
  • reports — Timestamped reports with keyword routing.
  • cross-modal-review — Quality gate via second model.
  • webhook-transforms — External events to brain pages.
  • testing — Validates every skill has SKILL.md with frontmatter.
  • skill-creator — Create new skills following the conformance standard.
  • skillify — The "skillify it!" meta-skill. 10-step loop.
  • skillpack-check — Agent-readable health report. Exit code for CI.
  • smoke-test — 8 post-restart health checks with auto-fix.
  • minion-orchestrator — Background work in one skill. Shell jobs + LLM subagents.

Identity & Setup

  • soul-audit — 6-phase interview generating SOUL.md and USER.md.
  • setup — Auto-provision PGLite or Supabase. First import.
  • migrate — Universal migration from Obsidian, Notion, Logseq, Roam.
  • briefing — Daily briefing with meeting context and citation tracking.

Architecture

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.

Brain Repo

Markdown files = source of truth. Human can always read and edit. Git-tracked. db_only and db_tracked tiering for bulk content.

GBrain

Postgres + pgvector. Hybrid search (vector + keyword + RRF). Graph traversal via recursive CTE. Embedded OAuth 2.1 admin dashboard.

AI Agent

29+ skills define HOW to use the brain. RESOLVER.md routes intent to skill. Agent reads skills and executes workflows.

Why It Works

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

Install in 30 Minutes

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?"

Frequently Asked Questions

What is GBrain?

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.

How long does installation take?

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.

Can I use it without an agent platform?

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.

How does the knowledge graph work?

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.

What are Minions?

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.

Is my data private?

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.