founder-os/g-brain
knowledge core

G-Brain

text · voice · drag or upload
Knowledge graph114 nodes
pillar health — live roster + runs + SOP coverage
SALESFINANCESCLIENTSMARKETINGTECHCOMMUNICATIONS
/ 100 health
doctor unreachablelast run 2d ago · data-agent
hybrid search degradedlocal fallback active
HEALTH / 100GBRAIN V0.41BRAIN-STORE · 0 PAGESZEROENTROPY · EMBEDDINGSSUPABASE · 918 PAGES · PAUSED
Storage layers
gbrain CLI
v0.41 · ~/.bun/bin/gbrain · doctor --fast
UNREACHABLE
brain-store/
~/knowledge/brain-store · markdown knowledge
0 pages
ZeroEntropy
hybrid-search embeddings · key in ~/.config/knowledge
LIVE
Supabase Second Brain
918 pages / 11k chunks · free tier idle-pause
PAUSED
doctor — health /100offline
Pipeline0 pages on disk
1

Markdown brain-store

~/knowledge/brain-store
0 pages on disk, plain .md files — the source of truth. gbrain sync walks the git repo and pushes changed pages up.
    sync · import
    2

    gbrain CLI

    chunk · embed · route — the engine between disk and database
    / 100 health · CLI unreachable
    • doctor offline — spawn /root/.bun/bin/gbrain ENOENT
    putgetquerysearchsyncimportexportdoctor
    embed · upsert
    3

    Supabase Postgres + pgvector

    "Second Brain" · ZeroEntropy embeddings
    918
    pages · last known
    11k
    chunks · last known

    Each page is split into chunks; every chunk gets a ZeroEntropy embedding stored in a vector column. Postgres holds both the text (tsvector) and the vectors, so one database answers keyword and semantic queries.

    Free tier pauses on idle — when hybrid queries fail, unpause from the Supabase dashboard. The brain-store on disk keeps working regardless.

    Query path

    What happens when an agent calls gbrain query — hybrid retrieval with an honest fallback.

    Question
    Natural-language query from you or an agent run.
    expand
    Query expansion
    The CLI rewrites the question into search variants (skip with --no-expand).
    fan out
    Keyword search
    Postgres tsvector full-text match over chunk text.
    Vector search
    pgvector nearest-neighbor over ZeroEntropy embeddings.
    merge
    RRF fusion
    Reciprocal-rank fusion merges both result lists into one ranking.
    answer
    Ranked snippets
    Top pages with snippets, returned to the agent.
    Fallback: local grep
    If Supabase is paused or unreachable, FOUNDER OS greps the markdown brain-store directly — fewer smarts, zero downtime.