* docs: rewrite README lead around search-vs-think differentiator The current README opened with a generic "smart but forgetful" tagline that buried the actual differentiator. Garry's 2026-05-23 X thread crystallized the positioning: "Search gives you raw pages. Think gives you the answer." That plus graph traversal plus gap analysis is what nobody else ships in one box. Changes: - README lead now leads with the search-vs-think frame, the "nobody else does this" claim, and the "strategic moat / so you don't lose context" framing. - Collapsed five stacked "New in vX.Y.Z" paragraphs in the lead into one Recent Releases section after the install path, freeing the first viewport to be about what gbrain IS, not what shipped last week. - New ## Search vs think section with side-by-side CLI example, gap-analysis explanation, and the find_trajectory + think compounding story. - ORIGIN.md closing paragraph names think as the reason the brain is worth building. - No em dashes used as connectors (per humanizer rules). - All factual claims (page counts, benchmark numbers, version references) preserved verbatim. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: add v0.40.6.0 to README Recent Releases Picked up sync --all + per-source locks + sources status dashboard from the v0.40.6.0 merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): add visceral "what this looks like" before/after table Pulled verbatim from BrainBench Cat 29 — same question, same brain, Haiku judge. Shows what a typical personal-knowledge brain (top-K vector retrieval, what MemPalace / Mem0 / Hindsight ship) returns vs what gbrain think returns. Search hallucinates three people who actually work at OTHER companies; think correctly identifies what's known + flags the gap. Score: search 1/10 vs think 9/10. The before/after lands above Install so the reader sees concrete differentiation before they decide to install. Backs the abstract "search vs think" claim from the lead with a real receipt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): swap before/after example to verbatim Cat 29 receipt (Q2 ARR) Per @garrytan — the prior example used the synthetic Q1 (employees of Horizon TECH 6) with paraphrased answer text. Replaced with the verbatim Cat 29 Q2 receipt: actual question (with the in-question typo that exists in the eval), actual truncated search-answer text from the JSON receipt, actual think-answer text with all three ARR readings + citations, and the actual Haiku judge verdicts pasted verbatim. Also strips Mem0 + Hindsight references from the comparator phrasing — Mem0 is a YC company we don't want to single out, and Hindsight was a hackathon-stage project that never launched. The comparison phrasing now reads "MemPalace and most peer AI-memory stacks" — accurate without naming systems we shouldn't be benchmarking against. The three things gbrain think did that a typical top-K retrieval cannot are listed below the table for readers who want the takeaway in plain English: 1. Caught the name typo (question said "Acme AI 0", brain has "Acme CO 0") 2. Walked the typed-claim Facts fence to build a chronological trajectory 3. Cited every claim Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): add "Your brain's shape (schema packs)" section Per @garrytan — the README had nothing on schema packs (v0.38/v0.39 dynamic-schema cathedral). New section lands between "How to get data in" and "Recent releases" so the narrative flow reads: what gbrain is → concrete example → install → query (search vs think) → get data in → schema packs (how the brain understands your shape) → recent releases → loop → capabilities → ... The section opens by naming the differentiator out loud: "Most personal- knowledge tools force one fixed layout: their idea of notes + people + tags. Drop a Notion export or your own years-old Obsidian vault and the agent doesn't know what your folders mean." Three options surfaced: - gbrain-base (default, zero-config Garry layout) - gbrain-recommended (extends base with 13 more dirs) - your own pack via the schema detect → suggest → review-candidates three-command magical moment Six representative CLI verbs shown verbatim. Closes with one paragraph explaining the threading through every read/write path (parseMarkdown, whoknows, extract_facts, search cache) and a one-line summary of the 7-tier resolution chain pointing at docs/architecture/schema-packs.md for the full reference. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): de-brand "Think" in the lead; reframe as GBrain's brain layer Per @garrytan — "we don't need to brand it Think, we want to say the think command later but we don't lead on it!" Changes: - Lead sentence: "Search gives you raw pages. Think gives you the answer" → "Search gives you raw pages. GBrain gives you the answer, through a brain layer." The product is GBrain; think is the CLI verb that runs the brain layer, introduced later. - Two-bullet differentiator list: the "gbrain think" bullet now leads with the capability ("A synthesis layer that gives you the actual answer.") rather than the CLI command. The bullet body still names what the layer does (synthesized prose, citations, gap analysis). - Strategic-moat paragraph: "`gbrain think` is what makes the moat usable" → "The brain layer is what makes the moat usable." - "What this looks like" table header: "GBrain `think`" → "GBrain's brain layer (one synthesized answer, run via `gbrain think`)". CLI command stays in the cell so the example is reproducible; the framing leads with what it IS, not the verb. - Three-bullet takeaway under the table: "Three things `gbrain think` did" → "Three things the brain layer did". Aggregate sentence: "gbrain think averages 5.60/10" → "GBrain's synthesis layer averages 5.60/10". - Section heading: "## Search vs think" → "## Two ways to query your brain". The section still introduces `gbrain search` and `gbrain think` as the two CLI verbs side by side; the heading no longer brands "think" as the thing. The "think command" comes through naturally where it appears as a CLI example. The PRODUCT is GBrain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): switch to first-person voice (Garry speaking directly) Per @garrytan — drop "Built by..." third-person framing and write in first person. Edits: - Lead credibility paragraph: "Built by the President and CEO of Y Combinator to run his actual AI agents" → "I'm Garry Tan, President and CEO of Y Combinator. I built GBrain to run my own AI agents." Subsequent sentences switch "his deployments" → "my deployments", "the agent ingests... you wake up smarter" → "my agent ingests... I wake up smarter — and so will you" (the closing "and so will you" connects Garry's experience to the reader's). - Compounding paragraph: "As Garry's personal agent gets smarter, so does yours" → "As my personal agent gets smarter, so does yours." - Schema packs section: "the layout used by Garry's production brain" → "the layout my production brain uses". - License + credit: "Built by Garry Tan to run his OpenClaw and Hermes deployments — the production brain behind his actual AI agents" → "I built GBrain to run my OpenClaw and Hermes deployments — the production brain behind my AI agents." The whole top of the README now reads as Garry talking directly to the reader about what he built and why. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): DRY the lead — drop redundant "through a brain layer" + repeat GBrain "GBrain gives you the answer, through a brain layer. GBrain is the brain layer your AI agent has been missing..." — two GBrains, two brain layers. Tightened to: "GBrain gives you the answer. It's the brain layer your AI agent has been missing — the only one that does synthesis, graph traversal, and gap analysis in one box." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): frame GBrain as a company brain too, link to YC RFS Per @garrytan — GBrain is now usable as a company brain (federated sync, OAuth scoping, Cat 22 source isolation), and YC just put company-brain on its Request for Startups. Added a paragraph after the personal-brain lead that names the three v0.34+ features that make multi-user safe (federated sync, per-source OAuth scoping, the Cat 22 leak-free source isolation), then links to https://www.ycombinator.com/rfs#company-brain with a one-line pitch: "if you're building in that space, you might as well build on this." The framing carries forward the personal-brain story while opening the aperture: GBrain works for one person (Garry's production deployment) AND for a team (per the features Cat 22 just verified). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): rewrite company-brain paragraph in plain English @garrytan caught me writing internal eval-suite jargon ("Cat 22 proves source isolation is leak-free across hybrid search, listPages, getPage, and federated reads") in a paragraph aimed at someone deciding whether to use GBrain. Rewritten in plain English: "Each person on the team gets their own slice of the brain, scoped by login. When you query, you only see what you're allowed to see — never another person's notes, never another team's data. We fuzz- tested this across every way you can read the brain (search, list, lookup, multi-source reads) and got zero leaks." Same factual content, zero internal vocabulary. The "Cat 22" name belongs in the benchmark page, not the front-door README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): add company-brain tutorial (Diataxis tutorial quadrant) End-to-end walkthrough for setting up GBrain as a multi-user company brain. Audience: founder / CTO / head of ops at a 10-50 person company who has heard about GBrain (from the YC RFS company-brain page or my tweets) and wants to set it up as their team's shared institutional memory. ~3700 words, written for a learner with zero prior gbrain knowledge. Twelve parts walk the reader from "I've never run gbrain" to "three teammates each query the brain through their own AI agent and see the correctly scoped answer": 1. The mental model (personal brain vs company brain, federated sources, OAuth scoping, what you get) 2. Prerequisites table (Postgres, embedding key, Anthropic key, git repo, Bun, host machine + cost projection) 3. Install + Postgres + API keys + doctor verify 4. Create three sources (shared / customers / internal) + sync 5. Spin up HTTP MCP server with --bind 0.0.0.0 + --public-url 6. Register one OAuth client per teammate with --source + --federated-read 7. Verify scoping works (alice can't see internal, bob can't see customers) 8. Connect each teammate's AI agent via thin-client install 9. First real `gbrain think` query showing sourced + synthesized + gap-analysis answer 10. Operating the brain (autopilot, doctor --remediate, sources status, admin dashboard) 11. Cost + speed expectations from the v0.40.6.0 benchmark 12. Common gotchas + troubleshooting Voice: - First-person Garry in intro / motivation paragraphs - Zero internal jargon. No "Cat 22", "P@5", "knobsHash", "RRF", "MRR" - Plain English throughout - No em dashes used as connectors (zero in final draft) - "Brain layer" / "synthesized answer" framing, not "Think" branding - No Hindsight, no Mem0 (per repeated session feedback) - Every example uses placeholder names (alice-example, bob-example, acme-co) Cross-linked from: - README.md company-brain paragraph - docs/INSTALL.md (under the migrate --to supabase block) - docs/architecture/topologies.md (See also section) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): drop version chatter, add Tutorials section, expand tutorial roadmap Per @garrytan: the README should read as the current docs written for people who have never known GBrain before. Versions are what the CHANGELOG is for. Version-chatter sweep across the README: - Killed the entire ## Recent releases section. That's a changelog summary, not docs. CHANGELOG.md owns it. - Stripped "(v0.38+)" from the ## How to get data in heading. - Rewrote "(the v0.38 put_page write-through plumbing)" as "(the database and on disk in one move)" — describes WHAT happens, not WHEN it shipped. - Stripped "(The legacy gbrain skillpack install managed-block model was retired in v0.36.0.0; run gbrain skillpack migrate-fence once if you're upgrading from an older release.)" from the skillpack paragraph. Upgrade history goes in the CHANGELOG. - Stripped "New in v0.40.4.0:" from the hybrid-search graph-signals description. Just describes what the feature does. - Stripped "As of v0.37," from the embedding-provider auto-detect paragraph in the Troubleshooting section. - Stripped "the embedding + reranker stack that became the v0.36.2.0 default" → "ships as the default" in the License + credit section. - Stripped "in Cat 29" from the synthesis-benchmark sentence (same internal-jargon class as Cat 22 which @garrytan called out earlier). Replaced ## Recent releases with ## Tutorials: - Links to the one shipped tutorial (company-brain.md) with a one-line description. - Names the next several planned tutorials in prose (not as broken links): personal brain quickstart, connect your agent, VC dealflow, vault migration, code brain. No fake links. - Points at the tutorial index page for the full roadmap. - Closes with "Open an issue describing the workflow you want documented" to invite prioritization input from real users. New tutorial index at docs/tutorials/README.md: - Shipped section: company-brain.md - In-progress roadmap with 7 candidate tutorials (personal brain quickstart, connect your agent, VC dealflow, vault migration, code brain, fully local, dream cycle setup) - Each roadmap entry names the persona, the core commands the tutorial would demonstrate, and the differentiator - "Want to write one?" section invites community PRs and points at company-brain.md as the model Reverted the obscure topologies.md "See also" link from pointing at company-brain.md specifically to pointing at the tutorials index overall — the tutorial belongs in the README's Tutorials section where users actually look, not buried in an architecture doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): land personal-brain tutorial (full-stack install) The canonical solo install walkthrough, adapted from Garry's live setup session notes (the "Apple I, soldering breadboards" session). Builds the full stack: 2 GitHub repos, Telegram bot, AlphaClaw on Render, OpenClaw + GBrain + Supabase. About 2 hours end-to-end, $100-150/month sustained. Replaces the "Set up your personal brain in 30 minutes" stub on the tutorials roadmap with something genuinely complete. Edits to the source draft: - Stripped brain-page YAML frontmatter (type/access/links/etc — not needed for a public docs file) - Privacy sweep per CLAUDE.md: removed real-name references to the collaborator and the agents involved in the session, replaced with "a collaborator" / "my main agent" / generic placeholder names - First-person voice consistency: the source draft slipped between first person and third person ("Garry walked through"); rewrote everything in first person - Zero em-dashes used as connectors (verified by grep) - Added ZeroEntropy to the providers list (it's the default; not mentioning it would leave readers paying 2.6× more on embeddings) - Opened with a router paragraph that points brain-layer-only readers at INSTALL.md and team readers at company-brain.md, so each audience finds the right walkthrough fast Tutorials index updated: - personal-brain.md promoted from In Progress to Shipped (it IS the "set up your personal brain in 30 minutes" entry that was on the roadmap, just better-named and more complete) README.md Tutorials section now lists both shipped tutorials side by side. Reads naturally: solo install first (broader audience), team install second. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): rewrite company-brain as a true superset of personal-brain Per @garrytan: the company brain tutorial should pick up from where the personal brain tutorial leaves off, not duplicate the install. Pedagogical flow now reads: "you already did personal-brain; here is what to add to make it multi-user." Restructure: - Opens with explicit "this tutorial picks up where the personal brain tutorial leaves off" + a router for readers who haven't done that one yet. No duplicated install steps. - Part 1 (mental model) reframed as "what changes when you go from personal to company" + "what this is NOT" (not a different install, not a thin-client-everywhere replacement). - Part 2 is now "switch the brain backend to multi-user Postgres" — surfacing the migrate --to supabase path for readers who started on PGLite, skip-to-Part-3 for readers already on Postgres. - Part 3 adds the new content @garrytan called for: per-person folder structure inside each source. customers/alice-example/, internal/ alice-example/, internal/bob-example/, internal/legal/ etc. So teammates' writes don't collide and the per-person/per-role abstraction is real on disk, not just in OAuth scope. - NEW Part 6: per-person crons. Each teammate gets their own scheduled tasks (7am customer digest for alice, 9am ops status for bob, weekly contract compliance for carol) scoped to their OAuth client so the cron can only touch their slice. - NEW Part 7: per-person skills. The 60+ shipped skills are generic; teams want a few specific ones (onboarding-new-hire, customer-success-followup, weekly-team-digest). Scaffolded via gbrain skillify scaffold, scoped via allowed_clients in frontmatter. - Existing strong parts retained: OAuth scoping + verify, per- teammate AI client connect, first synthesized query, operating notes, gotchas. Reworded where needed to refer back to personal- brain steps instead of re-explaining them. Voice + style sweeps: - Zero em-dashes used as connectors (verified by grep) - Zero internal jargon (no "Cat 22", "P@5", "RRF", "MRR", etc.) - Zero version chatter in body text (only the one acceptable reference to the dated benchmark filename in a docs link) - "Brain layer" / "synthesized answer" framing, not "Think" branding - First-person Garry voice in intro/motivation paragraphs - All examples use placeholder names (alice-example, bob-example, carol-example, acme-co, diana-example) - No mentions of Mem0 / Hindsight (per session-long convention) Word count: 3608 (vs 3717 before — about the same length, but more of those words now describe the NEW content rather than re-explaining prereq install). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): enrich company-brain with real-world patterns from production deployment Mined production patterns from my own running company-brain deployment to ground the tutorial in shapes that actually work. Added four substantive sections. Part 3 (sources) gains "Two scoping models" sidebar: - Model A: separate sources with OAuth scoping (SQL-enforced isolation, right for multi-user with different AI clients per person — what the tutorial walks you through). - Model B: one source with partners/<slug>/ directory convention (simpler ops, scoping is convention-only, right when one agent serves everyone over Telegram — what I actually run in production). - Mix-and-match guidance: separate sources for the obviously-different ones AND partners/<slug>/ inside the shared source for per-person workspace. Part 7 (skills) gains "Shared rule files at the skills root" subsection: - _brain-filing-rules.md: iron-rule decision tree for where new pages belong. Every ingest skill consults it before creating a page. - _output-rules.md: output quality standards (deterministic links built from API data not LLM-composed strings, citation format, no AI-slop). - _excluded-people.md: privacy gate naming people the brain must never reference even when they appear in source material. Re-attribute or discard. The file that prevents accidental publication of things about people who aren't fair game. - _operating-rules.md, _x-ingestion-rules.md, _x-api-rules.md. - These turn into the de facto company policy for the agent. Edit one, every skill picks it up next request. NEW Part 8 "Wire Slack carefully": - Two crons, two jobs (scan every 5-15min for live signals + archive nightly for full history). - Channel-to-task-ID mapping via topic-registry.json (don't reference raw Slack channel IDs in skills; friendly names that resolve at runtime). - Deterministic links rule (LLM-composed Slack URLs hallucinate constantly; build from API data only). - Dismissed-items state so re-scans don't surface noise that was already triaged. - Per-channel scoping mirrors per-person scoping. Sensitive channels scope by OAuth client. - Names the actual production skills (slack, slack-scan, slack-archive) for scaffold reference. NEW Part 9 "Onboard each teammate yourself (the botmaster pattern)": - The load-bearing UX gate for adoption. Don't hand a teammate an OAuth credential and tell them to "try it out." That's how internal tools die. - Step 1: pre-populate their slice (partners/<their-slug>/USER.md with role/focus/priorities/preferences, 5-10 concepts that are theirs, 2-3 example brain entries that demonstrate the shape). About 20 minutes per teammate. - Step 2: walk them through 2-3 wow flows personally. A synthesis query (show the brain layer). A gap-analysis query (build trust). A write-back flow (show capture value). About 15 minutes. - Step 3: graduate to DM only after the wow moment lands. The order flips the conversion rate. - About 45 minutes per person total. Cheaper than an unadopted tool. Parts 8-12 renumbered to 10-14 to make room. Cross-references in body text checked (Part 3 ref in Part 5, Part 4 ref in operating notes, Part 5 ref in Slack section all still correct). Word count: 4938 (vs 3608 before). Still readable in one sitting per the original target; added content is all load-bearing patterns from production. Voice gates: - Zero em-dashes used as connectors (sed-replaced all 8 introduced by the additions with periods) - Zero internal jargon (no Cat N, no P@5, no RRF, no MRR) - Zero banned names (no Brad, Gessler, Wintermute, Zion, Straylight, Seibel, Caldwell, Mem0, Hindsight) - "Brain layer" / "synthesized answer" framing preserved - First-person Garry voice throughout - All examples use placeholder names (alice-example, bob-example, carol-example, diana-example, acme-co) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(tutorials): expand personal-brain Step 7 with the three real Supabase gotchas @garrytan: the personal-brain tutorial needs to surface the specific Supabase setup gotchas I hit the hard way. Rewrote Step 7 with the operational detail. Three new subsections: - 7a: Turn on pgvector. The vector extension has to be toggled in Database → Extensions before GBrain's schema migrations will run. Five seconds in the dashboard, an hour of debugging if you forget. - 7b: Use the CONNECTION POOLER string, not the direct connection. Direct is port 5432, IPv6-only. Pooler is port 6543 via pgbouncer, IPv4-compatible, survives connection storms from parallel workers. Shows the exact pooler hostname format and the gbrain config set command. - 7c: Buy the IPv4 add-on. About $4/month. Even with the pooler, some Supabase regions / Render plans hit IPv6 resolution snags. Symptom: network-unreachable errors or connect hangs in gbrain doctor. Toggle on in Project Settings → Add-ons. Saves debugging time on multiple installs. - 7d: Verify with gbrain doctor — names which of 7a / 7b / 7c to revisit if a check fails. The old "Operating note" about Supabase being the scaling bottleneck preserved at the end of the section since it's a different concern (scale, not setup). Voice gates: 0 em-dashes (verified), first-person Garry voice ("I hit the hard way"), no internal jargon, no banned names. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): rewrite "What this looks like" for someone arriving cold @garrytan: the prior version assumed too much. "Eval receipt", "top-K vector retrieval", "MemPalace", "Haiku judge", "Facts fence", "synthesis layer" — all jargon that requires reading the rest of the project to parse. A new reader bounces. New version requires zero prior context: - Sets up a universal scenario anyone gets: "you have a meeting with alice tomorrow, what do you need to know?" - Shows what a typical tool returns (a list of 5 pages with snippets) so the reader sees the gap themselves - Shows what gbrain returns (a real briefing with the open items surfaced, plus a "heads up" about what's missing from the brain) - Lets the two outputs speak for themselves, no judge scores or benchmark numbers in the body - Closes with one plain-English sentence on the difference: "Search finds the pages. The brain reads them for you and writes the answer." What got cut: - The eval-receipt path reference (means nothing to a new reader) - The Haiku judge scores (0/10 vs 9/10) — not useful out of context - The verbatim judge verdict quotes (long, internal vocabulary) - The "Facts fence", "typed-claim", "synthesis layer" feature names - The MemPalace name-drop - The link to the comprehensive benchmark page (it's still reachable from the Tutorials and benchmark sections; doesn't need to be in the intro) - The numbered "three things gbrain think did" breakdown The example content is illustrative (same scenario shape as a real production query) but stripped of the internal benchmark wrapper. Reads naturally as "imagine you're about to ask gbrain something." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: capitalize proper-noun names in prose across README + tutorials @garrytan caught lowercase "alice" in prose — proper nouns should be capitalized. The lowercase was leaking from the slug convention (people/alice as the actual storage slug) into descriptive text. Rule applied: capitalize Alice / Bob / Carol / Diana / Acme when used as a person or company name in prose. Keep lowercase in: - Slugs and file paths (people/alice, customers/acme-co) - Code identifiers in fenced blocks where the slug IS the value - URLs and hostnames (brain.acme-co.com) - Channel-name-style references (#alice-customers) Files swept: README.md, docs/tutorials/company-brain.md, docs/tutorials/personal-brain.md, docs/tutorials/README.md. The README sweep was the primary target (Garry's actual call-out); the tutorial sweep keeps voice consistent across all the front-door docs. Hand-fixed four occurrences inside code-fenced blocks that were human comments rather than code (terminal session comments "# Terminal 1, as Alice", "# Terminal 2, as Bob", directory-tree inline comments "← Alice's customer notebook"). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(readme-hero-anchors): rotate ZeroEntropy anchor → search-vs-answer headline CI caught one expected regression after v0.40.8.1's README rewrite. The D9 hero-anchors guard required "ZeroEntropy" in the first 50 lines of README.md (the v0.36.0.0 default story). The post-rewrite hero intentionally rotated that out per Garry's "no version chatter in README" directive — ZeroEntropy still appears further down (line 211, 231, 279) but no longer in the hero. The guard's docstring explicitly handles this case: "did we deliberately rotate the headline? If yes: update the anchors here." Rotation: - Dropped: regex /ZeroEntropy|\bZE\b/ in the first 50 lines - Added: regex matching the new headline "Search gives you raw pages. GBrain gives you the answer." which is the load-bearing differentiator of the post-rewrite hero. If a future cleanup PR accidentally rewords the search-vs-answer framing, the new anchor catches it the same way the ZeroEntropy anchor caught accidental drops before. Other 4 anchors unchanged (OpenClaw + Hermes + production-number + P@5/R@5 — all still load-bearing). Updated docstring records the v0.40.8.1 rotation as the audit trail for the next time this happens. Verified: `bun test test/readme-hero-anchors.test.ts` → 5 pass / 0 fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): restore agent-led install path + per-client MCP guides The README install section had collapsed to three generic shapes ("agent platform", "CLI", "MCP server") that buried the load-bearing flow: paste a URL pointing at INSTALL_FOR_AGENTS.md into your agent and let it do the work. That's the path most users actually take. Restored the original three-tier structure with an explicit second tier for "install it into your existing agent" (Codex, Claude Code, Cursor), plus surfaced the per-client MCP guides individually so users see the command shape they actually need instead of one generic docs/mcp/ link. Six per-client MCP links now in the README itself: Claude Code, Cursor/Windsurf (stdio), Claude Desktop, Claude Cowork, Perplexity Computer, ChatGPT. Each carries the one-line shape that matters (claude mcp add, Settings > Integrations, OAuth 2.1, etc.). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(README): link personal-brain tutorial from the agent-install path People landing on the README without an existing OpenClaw or Hermes deployment need a starting point that walks the whole flow, not just "paste this URL into your agent." The personal-brain tutorial already covers picking a platform, deploying it, pointing it at INSTALL_FOR_AGENTS.md, and verifying the first query. Surfaced as a callout right under the agent-install snippet so the path is visible to first-time users without burying the experienced-user flow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26 KiB
GBrain
Search gives you raw pages. GBrain gives you the answer. It's the brain layer your AI agent has been missing — the only one that does synthesis, graph traversal, and gap analysis in one box.
I'm Garry Tan, President and CEO of Y Combinator. I built GBrain to run my own AI agents. It's the production brain behind my OpenClaw and Hermes deployments: 146,646 pages, 24,585 people, 5,339 companies, 66 cron jobs running autonomously. My agent ingests meetings, emails, tweets, voice calls, and original ideas while I sleep. It enriches every person and company it encounters. It fixes its own citations and consolidates memory overnight. I wake up smarter than when I went to bed — and so will you.
And now it works as a company brain too. Each person on the team gets their own slice of the brain, scoped by login. When you query, you only see what you're allowed to see — never another person's notes, never another team's data. We fuzz-tested this across every way you can read the brain (search, list, lookup, multi-source reads) and got zero leaks. Drop GBrain in as your team's shared institutional memory — the company-brain shape YC just put on its Request for Startups. If you're building in that space, you might as well build on this. Tutorial: set up GBrain as your company brain →
Lots of personal-knowledge systems give you keyword matching and grep in a box. GBrain does that, and adds two things nobody else ships together:
- A synthesis layer that gives you the actual answer. Synthesized, well-cited prose across people, companies, deals, and ideas. Not "here are 10 chunks that mention your query"; an actual answer with citations and an explicit note on what the brain doesn't know yet. The gap analysis is the part that changes how you use the brain.
- A self-wiring knowledge graph. Every page write extracts entity refs and creates typed edges (
attended,works_at,invested_in,founded,advises) with zero LLM calls. Ask "who works at Acme AI?" or "what did Bob invest in this quarter?" and get answers vector search alone can't reach. Benchmarked: P@5 49.1%, R@5 97.9% on a 240-page Opus-generated rich-prose corpus, +31.4 points P@5 over its graph-disabled variant and over ripgrep-BM25 + vector-only RAG by a similar margin. Full BrainBench scorecards live in the sibling gbrain-evals repo.
The point of building a 100K-page brain is to use it as a strategic moat. To never lose context. To query what's in your own head without re-reading it. The brain layer is what makes the moat usable. The 24/7 dream cycle is what keeps it sharp. Both run on your hardware, your DB, your keys.
It's easier to ship a daemon that runs 24/7 to ingest, enrich, and consolidate than it is to keep an agent in chat working hard. GBrain is that daemon, generalized. Install in 30 minutes. Your agent does the work. As my personal agent gets smarter, so does yours.
~30 minutes to a fully working brain. Database ready in 2 seconds (PGLite, no server). You just answer questions about API keys.
LLMs: fetch
llms.txtfor the documentation map, orllms-full.txtfor the same map with core docs inlined in one fetch. Agents: start withAGENTS.md(orCLAUDE.mdif you're Claude Code).
What this looks like
Say you have a meeting with Alice tomorrow. You want to walk in remembering what she works on, when you last talked, and what's still open between you. Here's what you'd type, and what you'd get back.
You ask:
"What do I need to know before my meeting with Alice tomorrow?"
Most personal-knowledge tools give you back a list of pages. Something like:
1. people/alice — Alice runs engineering at Acme...
2. meetings/2026-03-15-alice-q1 — Q1 product review with Alice...
3. meetings/2026-01-08-acme-kickoff — Kickoff meeting with Acme team...
4. customers/acme — Acme is a series-B fintech we work with...
5. notes/2026-04-22 — Quick chat with Alice about pricing...
Five pages you now have to open and read yourself to actually prepare. The tool found the right material, but it didn't do the work.
GBrain gives you back the answer, with sources:
Alice runs engineering at Acme (a series-B fintech). You last spoke
on April 22 in a quick pricing chat. Three things are still open
from that conversation:
1. She owes you the security review for the new tier
(deadline was May 1; no update since).
2. You committed to pricing for a 500-seat tier
(you sent it April 25; no response yet).
3. She mentioned they're hiring a CISO; you said you'd intro
someone from your network.
Heads up: nothing's been added to the brain about Alice or Acme
since April 22, six weeks ago. She may have replied through email
or Slack DM, channels the brain doesn't see. Worth asking her to
catch up before assuming any of this is still current.
Every claim has a source page behind it. The "heads up" at the end tells you what the brain doesn't know yet, so you can ask Alice about it directly instead of being surprised. The brain just did your meeting prep.
This is the difference between a search engine and a brain. Search finds the pages. The brain reads them for you and writes the answer.
Install
GBrain is designed to be installed and operated by an AI agent. The fastest path is to have your agent do it for you. The CLI and MCP paths below are for people who want to wire it up themselves.
Have your agent install it (recommended)
If you don't already have an AI agent platform running, start with one of these. Both are designed to read GBrain's install protocol and execute it:
- OpenClaw — deploy AlphaClaw on Render (one click, 8GB+ RAM)
- Hermes — deploy on Railway (one click)
Then paste this into your agent:
Retrieve and follow the instructions at:
https://raw.githubusercontent.com/garrytan/gbrain/master/INSTALL_FOR_AGENTS.md
The agent installs GBrain, creates the brain, asks for your API keys, loads 43 skills, configures the dream cycle, and verifies the install end-to-end. ~30 minutes. You answer questions, it does the work.
Never set up an AI agent platform before? The personal-brain tutorial walks the whole path end-to-end — picking OpenClaw vs Hermes, deploying it, pointing it at INSTALL_FOR_AGENTS.md, getting the API keys, and verifying the first query. Start there if any of the above is new.
Install it into your existing agent
Already running Codex, Claude Code, Cursor, or another coding agent? Paste the same instruction in:
Retrieve and follow the instructions at:
https://raw.githubusercontent.com/garrytan/gbrain/master/INSTALL_FOR_AGENTS.md
This works in any agent that can read files over HTTPS and execute shell commands. Tested with Codex, Claude Code, Claude Cowork, Cursor, and AlphaClaw.
CLI standalone (no agent)
bun install -g github:garrytan/gbrain
gbrain init --pglite # 2 seconds; no server, no Docker
gbrain doctor # verify health
gbrain import ~/notes/ # index your markdown
gbrain query "what themes show up across my notes?"
Postgres-at-scale, Supabase, and thin-client setup paths live in docs/INSTALL.md.
Connect GBrain to your AI client (MCP)
GBrain exposes 30+ tools over MCP (stdio and HTTP). The specific snippet depends on which client you use:
- Claude Code — one command:
claude mcp add gbrain -- gbrain serve. Zero server, zero tunnel. - Cursor / Windsurf / any stdio MCP client — same shape, add
{"command": "gbrain", "args": ["serve"]}to your MCP config. - Claude Desktop (Cowork) — Settings → Integrations → add the URL of your HTTP server. Remote only; the local
claude_desktop_config.jsondoes not work for remote servers. - Claude Cowork (team plan) — org Owner adds the connector under Organization Settings → Connectors.
- Perplexity Computer — Settings → Connectors → add the URL + bearer token. Pro subscription required.
- ChatGPT — uses OAuth 2.1 with PKCE (the hard requirement). Register a
chatgptclient from the admin dashboard with grant typeauthorization_code.
For the HTTP server itself:
gbrain serve # stdio MCP (local subprocess; for Claude Code, Cursor, Windsurf)
gbrain serve --http # HTTP MCP with OAuth 2.1 + admin dashboard at /admin
# (required for Claude Desktop, Cowork, Perplexity, ChatGPT)
The HTTP server includes DCR-style client registration, scope-gated access (read / write / admin), and rate limiting. Deployment guides (ngrok, Railway, Fly.io) live under docs/mcp/.
Two ways to query your brain
Raw retrieval (what most personal-knowledge tools ship) and a synthesis layer that gives you an actual answer. They serve different jobs.
# raw retrieval: top pages by hybrid score, fast, no LLM cost
gbrain search "who's working on AI agents at portfolio companies?"
# brain layer: synthesized answer with citations and gap analysis
gbrain think "who's working on AI agents at portfolio companies?"
gbrain search returns the top retrieved pages, ranked by hybrid scoring (vector + keyword + RRF + source-tier boost + reranker). Use it when you want raw material to skim: agent context windows, citation lookups, finding a specific quote.
gbrain think runs the same retrieval, then composes a synthesized answer across the results with explicit citations to the source pages AND an honest note on what the brain doesn't know yet. The gap analysis is the differentiator: the answer tells you when a page is stale, when a claim is uncited, when two pages contradict each other, when there's a hole you should fill.
Why it compounds. Pair the brain layer with find_trajectory and you get answers like "how have the company's metrics changed AND what does the team look like right now AND what did they promise / share AND when did we last meet AND what's the value-add I can offer here": well-scored, well-cited, in one shot. That's the strategic moat. That's why building a 100K-page brain is worth the effort.
gbrain agent run "..." exposes the same surface to a sub-agent through the Minions queue, with crash-safe two-phase persistence. Same answers, durable.
How to get data in
One command, local or hosted, synchronous receipt:
gbrain capture "the thought I want to remember"
gbrain capture --file ./notes/today.md
echo "from a pipe" | gbrain capture --stdin
SLUG=$(gbrain capture "..." --quiet)
The page lands in the database and on disk in one move. Default slug inbox/YYYY-MM-DD-<hash8> so captures cluster in a predictable triage location. On thin-client installs the verb routes through MCP to the server: same command, same UX.
For webhook ingestion (Zapier / IFTTT / Apple Shortcuts):
curl -X POST https://your-brain/ingest \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: text/markdown" \
-d "# a thought from a Shortcut"
For mobile capture, the inbox folder source picks up anything dropped into
~/.gbrain/inbox/ from iOS Shortcuts / AirDrop / Drafts / Finder.
Third-party skillpacks can ship custom ingestion sources (Granola, Linear,
voice, OCR) against the versioned IngestionSource contract at
gbrain/ingestion. See docs/skillpack-anatomy.md.
Your brain's shape (schema packs)
Most personal-knowledge tools force one fixed layout: their idea of "notes" + "people" + "tags." Drop a Notion export or your own years-old Obsidian vault on top, and the agent doesn't know what a Projects/ folder means or whether Reading/ is people or sources.
gbrain doesn't have a fixed layout. It ships with two bundled schema packs and lets you author your own when neither fits:
gbrain-base(default) — the layout my production brain uses:people/,companies/,concepts/,meetings/,deal/,daily/,originals/,writing/, etc. Zero config. Drop a brain that fits this shape and everything works.gbrain-recommended— extendsgbrain-basewith the 13 additional directories fromdocs/GBRAIN_RECOMMENDED_SCHEMA.md(source, place, trip, conversation, personal, civic, project, etc.). Activate withgbrain schema use gbrain-recommended.- Your own pack —
gbrain schema detectclusters your actual filesystem into proposed types,gbrain schema suggestruns an LLM pass over them, andgbrain schema review-candidates --applypromotes the ones you like. Three commands and the brain knows your shape.
gbrain schema active # which pack is running, which tier set it
gbrain schema list # bundled + installed packs
gbrain schema detect # propose types matching your filesystem
gbrain schema suggest # LLM-refined proposals on top of detect
gbrain schema review-candidates # human gate: promote / rename / ignore
gbrain schema use my-pack # activate
The active pack threads through every read + write path: parseMarkdown infers page type from the pack's path prefixes; whoknows scopes expert routing to types declared expert_routing: true; extract_facts runs only on extractable: true types; the search cache folds the pack name + version into its key so cross-pack contamination is structurally impossible. Switch packs and the brain re-interprets itself; switch back and nothing's lost.
Seven-tier resolution chain (per-call flag → env var → per-source DB key → brain-wide DB key → gbrain.yml → ~/.gbrain/config.json → gbrain-base default). Full reference + authoring guide: docs/architecture/schema-packs.md.
Tutorials
Step-by-step walkthroughs for getting the most out of GBrain. Each one takes you from zero to a working outcome, with concrete commands and real numbers.
- Set up your personal AI agent + brain from zero — the canonical full-stack install. Two GitHub repos, a Telegram bot, AlphaClaw on Render, OpenClaw + GBrain + Supabase. End-to-end in about 2 hours.
- Set up GBrain as your company brain — federated, multi-user, OAuth-scoped institutional memory for a 10-50 person team. About 90 minutes end-to-end.
More walkthroughs in progress: connecting an existing agent (Claude Code, Cursor, OpenClaw, Hermes) to a GBrain memory layer; setting up GBrain for VC dealflow with founder scorecards and meeting prep; migrating an existing Notion or Obsidian vault; indexing a codebase as a queryable code brain. Full tutorial index: docs/tutorials/.
Want to see a tutorial that isn't here yet? Open an issue describing the workflow you want documented.
What it does (the loop)
signal → search → respond → write → auto-link → sync
(every (brain-first (informed (page + (typed edges (cron
message) retrieval) by context) timeline) + backlinks) keeps fresh)
- Signal detector runs on every message your agent receives. Captures ideas, entity mentions, time-sensitive todos, names, links.
- Brain-first lookup before any external API call. The cheapest, fastest, most personal information source you have.
- Auto-link fires on every page write. No LLM calls; pure pattern matching on
[[wiki/people/bob]]style references. New entity → new page stub → graph grows. - Cron-driven enrichment runs while you sleep: dedup people pages, fix citations, score salience, find contradictions, prep tomorrow's tasks.
The whole loop is described in docs/architecture/topologies.md with diagrams.
Capabilities
Hybrid search. Vector (HNSW on pgvector) + BM25 keyword + reciprocal-rank fusion + source-tier boost + intent-aware query rewriting. Three named search modes (conservative, balanced, tokenmax) bundle the cost/quality knobs into a single config key. Live cost/recall comparisons in docs/eval/SEARCH_MODE_METHODOLOGY.md. Default: balanced with ZeroEntropy reranker on. Per-query graph signals notice when a top result is a hub for THAT query (adjacency boost), is corroborated across team brains (cross-source boost), or is being crowded out by weak chunks from a chatty session (session demote). Run gbrain search "<query>" --explain to see per-stage attribution: base score, every boost that fired, what it multiplied. gbrain doctor ships a graph_signals_coverage check; gbrain search stats shows fire counts and failure breakdowns.
Self-wiring knowledge graph. Every put_page extracts entity refs from markdown/wikilinks/typed-link syntax and writes edges with zero LLM calls. Typed edges (attended, works_at, invested_in, founded, advises, mentions, …). Multi-hop traversal via gbrain graph-query. The graph is what produces the +31.4 P@5 lift over vector-only RAG.
Job queue (Minions). BullMQ-shaped, Postgres-native job queue. Durable subagents (LLM tool loops that survive crashes via two-phase pending→done persistence), shell jobs with audit, child jobs with cascading timeouts, rate leases for outbound providers, attachments via S3/Supabase storage. Replaces "spawn subagent as fire-and-forget Promise" with something that recovers from anything.
43 curated skills. Routing lives in skills/RESOLVER.md. Covers signal capture, ingest (idea / media / meeting), enrichment, querying, brain ops, citation fixing, daily task management, cron scheduling, reports, voice, soul audit, skill creation, eval framework, and migrations. Skills are markdown files (tool-agnostic), packaged as a single skillpack the installer drops into your agent workspace.
Eval framework. gbrain eval longmemeval runs the public LongMemEval benchmark against your hybrid retrieval. gbrain eval export + gbrain eval replay capture real queries and replay them against code changes (set GBRAIN_CONTRIBUTOR_MODE=1). gbrain eval cross-modal cross-checks an output against the task using three different-provider frontier models. Full methodology in docs/eval/SEARCH_MODE_METHODOLOGY.md.
Brain consistency. gbrain eval suspected-contradictions samples retrieval pairs, layered date pre-filter, query-conditioned LLM judge, persistent cache. Surfaces conflicts between takes + facts the agent has written. Wired into the daily dream cycle.
Agent-authored schema (v0.40.7.0). Your brain has a shape — what page types exist (person, meeting, paper, case, lab-result), what they link to (attended, authored, prescribed-by), what facts get extracted automatically. The default ships with 22 universal types, but your brain's actual shape is not the default shape. Agents can now evolve that shape on your behalf via 14 gbrain schema CLI verbs + a batched MCP op (schema_apply_mutations, admin scope, NOT localOnly so remote agents reach it over HTTPS). Atomic file locks, audit log with the agent's identity, chunked UPDATE backfill in 1000-row batches that never wedge concurrent writers. The brain stops being a pile of notes and becomes something with structure. Why it matters: docs/what-schemas-unlock.md — 7 killer use cases (4000 invisible meetings, founder ops brain, research brain, legal brain, team brain, agent-as-co-curator). 5-minute walkthrough: docs/schema-author-tutorial.md. Agent skill: skills/schema-author/SKILL.md.
Integrations
Data flowing into the brain. Each integration is a recipe — markdown + setup hints — that ships in recipes/ and is discoverable via gbrain integrations list.
- Voice: Phone calls create brain pages via Twilio + OpenAI Realtime (or DIY STT+LLM+TTS). Setup recipe:
recipes/twilio-voice-brain.md. - Email + calendar: webhook handlers that route to brain signals.
docs/integrations/meeting-webhooks.md. - Embedding providers: 16 recipes covering OpenAI (default fallback), OpenRouter, Voyage, ZeroEntropy (default), Google Gemini, Azure OpenAI, MiniMax, Alibaba DashScope, Zhipu, Ollama (local), llama.cpp llama-server (local), LiteLLM proxy. Pricing matrix + decision tree in
docs/integrations/embedding-providers.md. - Credential gateway: vault-aware secret distribution.
docs/integrations/credential-gateway.md. - MCP clients: every major MCP client is supported.
docs/mcp/per-client setup.
Architecture
Two engines, one contract. PGLite (Postgres 17 via WASM, zero-config, default) for personal brains up to ~50K pages. Postgres + pgvector (Supabase or self-hosted) for shared / large / multi-machine deployments. The contract-first BrainEngine interface in src/core/engine.ts defines ~47 operations both engines implement; CLI and MCP server are generated from one source.
Brain repo is the system of record. Your knowledge lives in a regular git repo (your "brain repo") as markdown files. GBrain syncs the repo into Postgres for retrieval; deletes in git become soft-deletes in DB. You can publish public subsets, share team mounts, run thin-client setups pointing at a colleague's brain server. Topologies in docs/architecture/topologies.md.
Two organizational axes (brain ⊥ source). A brain is a database (your personal brain, a team mount you joined). A source is a repo inside that brain (wiki, gstack, an essay, a knowledge base). Routing lives in .gbrain-source dotfiles and resolves via a documented 6-tier precedence chain. Full diagrams in docs/architecture/brains-and-sources.md.
Why the graph matters. Vector search returns chunks that are semantically close. The graph returns chunks that are factually connected. Hybrid search pulls from both; auto-linking on every write keeps the graph fresh. Deep dive: docs/architecture/RETRIEVAL.md.
Troubleshooting
gbrain import fails with expected N dimensions, not M? Run gbrain doctor. It will print the exact gbrain config set ... or gbrain retrieval-upgrade command to repair the mismatch. You should not need to delete ~/.gbrain. Fresh gbrain init --pglite auto-detects your embedding provider from API keys in your environment: set OPENAI_API_KEY (or ZEROENTROPY_API_KEY / VOYAGE_API_KEY) before running init, or pass --embedding-model <provider>:<model> explicitly. With multiple keys set, init fires an interactive picker. In non-TTY contexts (CI, Docker) with no keys, init exits 1 with a paste-ready setup hint; pass --no-embedding to defer setup until runtime. See docs/integrations/embedding-providers.md for the full provider matrix and docs/operations/headless-install.md for Docker/CI sequencing.
Docs
docs/INSTALL.md— every install path, end to enddocs/what-schemas-unlock.md— why schemas matter: 7 killer use cases, the structural argument for typed page kinds, the agent-co-curates pattern (v0.40.7.0)docs/schema-author-tutorial.md— 5-minute walkthrough: fork the bundled pack, add a custom type, backfill existing pages, prove the wiring viagbrain whoknowsdocs/architecture/— system design, topologies, retrieval theorydocs/guides/— how-to runbooks (sub-agent routing, minion deployment, skill development, brain-first lookup, idea capture, diligence ingestion)docs/integrations/— connecting external data sources (voice, email, calendar, embedding providers)docs/mcp/— per-client MCP setup (Claude Desktop, Code, Cursor, ChatGPT, Perplexity, Cowork)docs/eval/— eval framework, metric glossary, methodologydocs/ethos/— philosophy (thin harness, fat skills, markdown as recipes, origin story)AGENTS.md— entry point for non-Claude agentsCLAUDE.md— entry point for Claude Code (deep operating context)CONTRIBUTING.md— contributor guide, test discipline, eval-capture modeSECURITY.md— OAuth threat model, hardening defaults
Contributing
Run bun run test for the fast loop, bun run verify for the pre-push gate, bun run ci:local to run the full Docker-backed CI stack locally. Detailed test discipline in CONTRIBUTING.md.
Community PRs are batched into release waves rather than merged one-by-one — see the "PR wave workflow" section in CLAUDE.md. Contributor attribution stays attached via Co-Authored-By: trailers. We credit every accepted contribution in CHANGELOG.md.
If you find a bug or want a feature: open an issue first. Quick fixes (typo, doc bug, obvious regression) can go straight to a PR. Anything touching schema, retrieval ranking, MCP protocol, or the security boundary needs a design discussion in the issue first.
License + credit
MIT. I built GBrain to run my OpenClaw and Hermes deployments — the production brain behind my AI agents.
Origin story: docs/ethos/ORIGIN.md.
Community PR contributors are credited in CHANGELOG.md per release. ZeroEntropy (@zeroentropy) for the embedding + reranker stack that ships as the default. Voyage AI for the asymmetric-encoding recipe template. Ramp Labs for the search quality improvements lineage.