Knowledge Brain System

Agent-powered persistent memory, signal detection, content ingestion, entity enrichment, task management, and cron scheduling. The knowledge companion to the quality review stack. See Knowledge System Architecture Comparison for architectural analysis.

Architecture

The brain is a git repo of markdown files. The retrieval layer (local search via qmd, or Postgres + pgvector for hybrid search) sits between the files and the agent. Skills define how the agent reads, writes, and maintains the brain.

Brain Repo (git, markdown) → Retrieval Layer (qmd / pgvector) → AI Agent (skills)

Kevin's implementation uses qmd (BM25 + vector + query expansion + LLM re-ranking, all local GGUF models). See QMD - Local Wiki Search Engine.

The ZeroEntropy bookmark adds a concrete retrieval-stack signal for GBrain: Garry Tan says GBrain now recommends ZeroEntropy as the default embedding/reranking option over OpenAI and Voyage AI, and his self-thread calls it SOTA on GBrain embedding/reranking. Treat that as a retrieval-quality and latency/cost clue, while ZeroEntropy remains the source page for current model/API facts. Source: X/@garrytan, 2026-05-23

The "personal 200 IQ Google Reader" bookmark names the user-facing job of a brain system: it should ingest and route a person's reading stream so the assistant becomes a high-context feed reader, not a passive archive. In Kevin's wiki terms, the equivalent surface is source capture plus compiled synthesis plus reminders that point back into the graph. Source: X/@garrytan, 2026-04-07

Joshua Park's GBrain comparison bookmark is useful as external pressure on Kevin's wiki design: file-backed memory stays valuable because agents can inspect and patch it, but retrieval cannot be "just grep" forever once the brain crosses roughly ten thousand lines and becomes a multi-corpus operating system. The durable boundary is explicit: keep canonical knowledge as markdown/git, put qmd or hybrid search between the files and the agent, and graduate to hosted or database-backed retrieval only when search quality and operational scale require it. Park's self-thread points to Membase as a hosted "no setup" fallback, which is a routing option rather than a replacement for Kevin's canonical repo. Source: X/@JoshuaIPark and self-thread, 2026-04-10/11; Source: Membase homepage, checked 2026-07-04

Skill Patterns

Always-on

Skill Function
signal-detector Fires on every message. Cheap sub-agent spawns in parallel to capture original thinking and entity mentions. Brain compounds on autopilot.
brain-ops Brain-first lookup before any external API. The read-enrich-write loop.

Content Ingestion

Skill Function
ingest Thin router - detects input type, delegates to specialized ingestion skill
idea-ingest Links, articles, tweets → brain pages with analysis, author pages, cross-linking
media-ingest Video, audio, PDF, books, screenshots, GitHub repos → transcripts, entity extraction
meeting-ingestion Transcripts → brain pages. Every attendee enriched. Every company gets timeline entry.

Brain Operations

Skill Function
enrich Tiered enrichment (Tier 1/2/3). Creates/updates person+company pages with compiled truth.
query 3-layer search with synthesis and citations. Says "brain doesn't have info" vs hallucinating.
maintain Stale pages, orphans, dead links, citation audit, back-link enforcement, tag consistency
repo-architecture Filing decisions - primary subject determines directory

Operational

Skill Function
daily-task-manager P0-P3 task lifecycle stored as searchable brain pages
daily-task-prep Morning prep: calendar lookahead with brain context per attendee
cron-scheduler Staggered scheduling, quiet hours, timezone-aware, idempotent
cross-modal-review Quality gate via second model. Refusal routing: if one refuses, silently switch.
skill-creator Create new skills following conformance standard. MECE check against existing.

Identity and Setup

Skill Function
soul-audit 6-phase interview → SOUL.md (agent identity), USER.md (user profile), HEARTBEAT.md (cadence)
setup Auto-provision search backend
migrate Universal migration from Obsidian, Notion, Logseq, markdown, CSV, JSON, Roam

Key Patterns in Kevin's System

Pattern Implementation
Signal detection Ingest is explicit via "add it" command + Capture Ingest Protocol
SOUL/USER/HEARTBEAT wiki/SOUL.md, wiki/USER.md, wiki/HEARTBEAT.md
Skill conformance YAML frontmatter with name, description, triggers. Validated by scripts/doctor-routing.ts
RESOLVER dispatch wiki/SKILL-RESOLVER.md + config/cursor/rules/tool-hierarchy.mdc
Brain-first lookup qmd search before external APIs. Enforced by wiki-source-of-truth.mdc
Cross-modal review skills/engineering/cross-modal-review/SKILL.md
Maintenance scripts/doctor.ts (5 sub-doctors), scripts/lint.ts, scripts/check-freshness.ts

Garry's "Resolvers" article is the management-layer explanation for why GBrain's skillpack needs resolver docs and reachability audits. Skills are capabilities, but the resolver is what makes those capabilities callable, fileable, and maintainable as the brain grows. For Kevin's stack, this maps to The Resolver Pattern, check-resolvable, trigger evals, and the rule that every brain-writing skill consults the filing resolver before creating pages. Source: X/@garrytan and Glean mirror, 2026-07-04

Version Snapshot

The v0.10.0 bookmark is now historical, not current state. Its reviewed release-note image says GBrain moved from 8 to 24 skills, added signal detection, a 215-line RESOLVER.md, SOUL/USER/ACCESS_POLICY/HEARTBEAT generation, access control, conventions, gbrain init GStack detection, and a conformance standard for skill frontmatter/contract/anti-pattern/output sections. Source: local X image artifact, 2026-06-30; Source: X/@garrytan, 2026-04-15

Current upstream snapshot as of 2026-07-04: garrytan/gbrain default branch master at 646179047a8e4ad9c462d83ce9a67a50ba076de8, package/version 0.42.56.0, MIT license, 24,961 GitHub stars, 3,592 forks, pushed 2026-07-02, and 55 top-level skills/ directories. The README packages that as 43 curated installer skills, while llms.txt describes 26 fat-markdown skills; use the repo snapshot for capability audit and the user-facing docs for install claims. The live install guide also makes retrieval budget selection an explicit agent/operator checkpoint: after gbrain init, the agent must present the cost matrix and confirm conservative, balanced, or tokenmax search mode before continuing. Source: GitHub API and raw VERSION/package.json/INSTALL_FOR_AGENTS.md/README.md, 2026-07-04

The v0.9.0 artifact is now reviewed as the release where "code + skills working together" became explicit: skills carry judgment calls, deterministic code does the work, and the goal is zero-LLM-call mechanical execution where possible. The release-note image lists five deterministic commands: gbrain publish, gbrain check-backlinks, gbrain lint --fix, gbrain report, and gbrain files upload-raw; it also names production skills such as Iron Law of Back-Linking, Enrichment Protocol, Filing Rules, Ingest Handles Everything, Voice Hardened, and X-to-Brain Gets Eyes. This is historical evidence for the same design rule Kevin uses: encode repeatable mechanical work in scripts and skills, then keep the agent responsible for judgment and routing. Source: X/@garrytan and local image review, 2026-07-04

The current GBRAIN_SKILLPACK.md linked from Garry's bookmark is a reference architecture for production agent brains, not a one-off install prompt. It frames GBrain as a self-building memex over 14,700+ brain files, 40+ skills, and 20+ cron jobs, then routes agents through brain-agent loop, entity detection, originals capture, brain-first lookup, compiled truth, source attribution, enrichment, meeting/media/diligence ingestion, deterministic collectors, Minions cron routing, quiet hours, model routing, search modes, brain-vs-memory separation, and integration recipes. This is the transferable lesson for Kevin's wiki: keep the harness thin, make the skillpack the operational contract, and treat ingestion/maintenance as recurring systems. Source: X/@garrytan, 2026-04-10; Source: docs/GBRAIN_SKILLPACK.md, 2026-07-03

Garry's connector/phone-skillpack row is historical roadmap proof for GBrain acting as the bridge between otherwise locked-down agents. The root post names Claude Cowork and Perplexity Computer connectors via MCP, plus a Twilio "Call-Your-Claw-By-Phone" skillpack; the self-thread says the setup was open source and, seven hours later, shipped. Treat it as a GBrain capability-direction signal, while the current repo snapshot remains the authority for what is actually present today. Source: X/@garrytan and self-thread, 2026-04-11; Source: GitHub garrytan/gbrain, checked 2026-07-04

Garry's later "memory is markdown" bookmark is the compact operator version of the same idea: if memory dies with the harness, the harness owns too much. Its self-thread points to a 2026-04-11 X Article card titled "Thin Harness, Fat Skills"; anonymous source review could recover the article card but not the full body. Treat the recoverable durable content as the root tweet plus the already-reviewed skillpack architecture, not as a separate unverified article. Source: X/@garrytan and enriched self-thread review, 2026-07-04

The open-source launch artifact is the earliest install UX for the project: paste a prompt into OpenClaw, install Bun, add github:garrytan/gbrain, run gbrain init --supabase, scan local markdown repos, import the best candidate with gbrain import <path> --no-embed, query it, then read the schema and skillpack docs before wiring a daily gbrain check-update cron. The critical operator rule in the prompt is "notify on new features only, never auto-install," which keeps memory/tool upgrades reviewable. Source: X/@garrytan, 2026-04-09; Source: local artifact review, 2026-07-03

Minions

GBrain v0.11's Minions feature turns long-running sub-agent work into durable jobs rather than synchronous sessions_spawn calls. The reviewed artifact describes a Postgres/PGLite job queue inside the brain: every long-running task is listed in gbrain jobs list, streams progress, survives gateway restarts, and can be paused, resumed, or steered mid-flight. The implementation pattern is useful beyond GBrain: store the work item, make it idempotent, expose transcript/progress state, and run workers with concurrency limits instead of trusting a chat gateway timeout. Source: X/@garrytan, 2026-04-18; local artifact review, 2026-07-02

The artifact's production comparison claims a 753ms Minions job path versus >10,000ms gateway timeout for sessions_spawn, zero token cost versus about $0.03 per spawn, 100% success versus 0% spawn success in the tested path, and about 2MB memory per job versus about 80MB. The more transferable details are FOR UPDATE SKIP LOCKED, max_children, idempotency keys, job transcripts, and worker supervision. Source: local X image artifact, 2026-07-02

Search Comparison

Feature Kevin's Wiki (qmd) Full pgvector
Engine BM25 + vector + query expansion + LLM re-ranking HNSW cosine + tsvector + RRF fusion
Models All local GGUF Cloud or local
Setup qmd collection add, zero infrastructure Postgres + pgvector
Cost Free $25/mo+

Timeline