Files
gbrain/docs/GBRAIN_SKILLPACK.md
Garry Tan 91ced664b6 feat: Voice v0.8.0 + feature discovery + Edge Function removal (#55)
* chore: remove Supabase Edge Function MCP deployment

The Edge Function never worked reliably. All MCP traffic goes through
self-hosted server + ngrok tunnel. Removes deploy-remote.sh, edge-entry.ts,
supabase/functions/, .env.production.example, and CHATGPT.md (OAuth not
implemented).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: rewrite MCP docs for self-hosted + ngrok deployment

All per-client guides updated from Edge Function URLs to self-hosted
server + ngrok tunnel pattern. DEPLOY.md rewritten with local vs remote
paths. ALTERNATIVES.md now shows self-hosted as primary, with ngrok,
Tailscale, and Fly.io/Railway comparison.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: voice recipe v0.8.0 — 25 production patterns from real deployment

Identity separation, pre-computed bid system, conversation timing fix,
proactive advisor mode, radical prompt compression, OpenAI Realtime
Prompting Guide structure, auth-before-speech, brain escalation, stuck
watchdog, never-hang-up rule, thinking sounds, fallback TwiML, tool set
architecture, trusted user auth, caller routing, dynamic VAD, on-screen
debug UI, live moment capture, belt-and-suspenders post-call, mandatory
3-step post-call, WebRTC parity, dual API events, report-aware query
routing. WebRTC pseudocode updated with native FormData and 6 gotchas.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: post-upgrade feature discovery framework

upgrade.ts captures old version before upgrading, then execs
gbrain post-upgrade (new binary) to read migration files and print
feature pitches. Migration files get YAML frontmatter with feature_pitch
field (headline, description, recipe, tiers). CLI prints excited builder
tone post-upgrade. v0.8.0 migration offers voice setup with environment
detection (server vs local) and 3-tier progressive disclosure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add Voice section to README with WebRTC screenshot + tweet link

Her out of the box: voice-to-brain with 25 production patterns. WebRTC
client screenshot embedded. Remote MCP section rewritten for self-hosted
+ ngrok. Setup block genericized.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: add recipe validation tests + genericize personal refs

5 new integration tests: secrets completeness, semver version, requires
resolution, all-recipes-parse, no-personal-references. Test fixture
genericized. CLAUDE.md/TODOS.md/SKILLPACK updated for v0.8.0. build:edge
script removed from package.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: bump version and changelog (v0.8.0)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 10:52:30 -10:00

6.5 KiB

GBrain Skillpack: Reference Architecture for AI Agents

This is a reference architecture for how a production AI agent uses gbrain as its knowledge backbone. Based on patterns from a real deployment with 14,700+ brain files, 40+ skills, and 20+ cron jobs running continuously.

The memex vision, realized. Vannevar Bush imagined a device where an individual stores everything, mechanized so it may be consulted with exceeding speed. GBrain is that device, except the memex builds itself. The agent detects entities, enriches pages, creates cross-references, and maintains compiled truth automatically.

Each section below is a standalone guide. Click through to the full content.


Core Patterns

The foundational read-write loop and data model.

Guide What It Covers
The Brain-Agent Loop The read-write cycle that makes the brain compound over time
Entity Detection Run it on every message. Capture original thinking + entity mentions
The Originals Folder Capturing WHAT YOU THINK, not just what you found
Brain-First Lookup Check the brain before calling any external API
Compiled Truth + Timeline Above the line: current synthesis. Below: append-only evidence
Source Attribution Every fact needs a citation. Format and hierarchy

Data Pipelines

Getting data in and keeping it current.

Guide What It Covers
Enrichment Pipeline 7-step protocol, tier system (Tier 1/2/3 by importance)
Meeting Ingestion Always pull complete transcript, propagate to all entity pages
Content & Media Ingestion YouTube, social media bundles, PDFs/documents
Diligence Ingestion Data room materials: pitch decks, financial models, cap tables
Deterministic Collectors Code for data, LLMs for judgment. The collector pattern
Idea Capture & Originals Depth test, originality distribution, deep cross-linking
Getting Data In Integration recipes: voice, email, X, calendar

Operations

Running a production brain.

Guide What It Covers
Reference Cron Schedule 20+ recurring jobs, quiet hours, dream cycle
Quiet Hours & Timezone Hold notifications during sleep, timezone-aware delivery
Executive Assistant Pattern Email triage, meeting prep, scheduling
Operational Disciplines Signal detection, brain-first, sync-after-write, heartbeat, dream cycle
Skill Development Cycle 5-step cycle: concept, prototype, evaluate, codify, cron

Architecture

How to structure your system.

Guide What It Covers
Two-Repo Architecture Agent repo vs brain repo, boundary rules, decision tree
Sub-Agent Model Routing Which model for which task, signal detector pattern, cost optimization
The Three Search Modes Keyword, hybrid, direct. When to use each
Brain vs Agent Memory 3 layers: GBrain (world knowledge), agent memory, session

Integrations

Wiring up your life.

Guide What It Covers
Credential Gateway ClawVisor / Hermes for Gmail, Calendar, Contacts
Meeting & Call Webhooks Circleback transcripts + Quo/OpenPhone SMS/calls
Voice-to-Brain Phone calls + WebRTC browser calls create brain pages. 25 production patterns: identity separation, bid system, conversation timing, proactive advisor, prompt compression, caller routing, dynamic VAD, real-time logging, belt-and-suspenders post-call
Email-to-Brain Gmail messages flow into entity pages via deterministic collector
X-to-Brain Twitter monitoring with deletion detection + engagement velocity
Calendar-to-Brain Google Calendar events become searchable daily brain pages
Meeting Sync Circleback transcripts auto-import with attendee propagation

Administration

Keeping it running and up to date.

Guide What It Covers
Upgrades & Auto-Update check-update, agent notifications, migration files
Live Sync Keep the index current: cron, --watch, webhook approaches

Appendix: GBrain CLI Quick Reference

Command Purpose
gbrain search "term" Keyword search across all brain pages
gbrain query "question" Hybrid search (vector + keyword + RRF)
gbrain get <slug> Read a specific brain page by slug
gbrain sync Sync local markdown repo to gbrain index
gbrain import <path> Import files into the brain
gbrain embed --stale Re-embed pages with stale or missing embeddings
gbrain integrations Manage integration recipes (senses + reflexes)
gbrain stats Show brain statistics (page count, last sync, etc.)
gbrain doctor Diagnose brain health issues
gbrain check-update Check for new versions and integration recipes

Run gbrain --help for the full command reference.


Architecture & Philosophy