People overthink this — they think they need to learn vector databases and embeddings. You don't. A "second brain" is just a few layers, each doing one obvious job. Here's the whole mental model — then the full build if you want it.
The mental model — this is all you actually need to understand.
↑ truth at the bottom · the AI on top · each layer does exactly one job
A structured map of the people, projects & decisions that matter (e.g. GBrain). The "who/what" your notes are about.
"Have we solved this before?" over past work sessions (e.g. CASS). Useful once you're coding with agents a lot.
Auto-pull email/calendar/Slack in, and a nightly pass that tidies notes into durable memory. Pure convenience — bolt on last.
Same four layers — here's how the real pieces wire together on my box. Markdown owns the truth; everything else serves it.
flowchart TB
subgraph SRC["📥 INGESTION"]
direction LR
GM["Gmail · Calendar"]:::src
SL["Slack"]:::src
end
subgraph KNOW["📚 KNOWLEDGE LAYER — markdown owns the truth"]
direction LR
OBS["Obsidian Vault
wiki + brain"]:::truth
GB["GBrain
typed entity graph"]:::truth
AM["Agent Memory
~/.agents/memory"]:::truth
end
QMD["🔍 RETRIEVAL LAYER — QMD
lex · vec · hyde · remote embed (OpenRouter)"]:::retr
HS["🧠 MEMORY LAYER — Hindsight
retain / recall / reflect · shared cloud bank"]:::work
CASS["💻 CASS
coding-session recall"]:::code
subgraph RT["🤖 THE AI — runtimes"]
direction LR
HER["Hermes
always-on assistant"]:::rt
OMP["OMP
interactive coding"]:::rt
end
CRON["⏰ cron + nightly 'dream' pass"]:::sch
GM --> GB
SL --> GB
OBS --> QMD
GB --> QMD
AM --> QMD
QMD --> HER
QMD --> OMP
HER <==> HS
OMP <==> HS
OMP <==> CASS
HS -. "reviewed promotions" .-> AM
CRON --> GM
CRON --> AM
classDef src fill:#3a2412,stroke:#fb923c,color:#ffe6cf,stroke-width:1.5px;
classDef truth fill:#0e3330,stroke:#34d399,color:#d7fff2,stroke-width:1.5px;
classDef retr fill:#10233f,stroke:#22d3ee,color:#d6f6ff,stroke-width:2px;
classDef work fill:#241646,stroke:#7c5cff,color:#ece4ff,stroke-width:2.5px;
classDef code fill:#3a1226,stroke:#f471b5,color:#ffd6e6,stroke-width:1.5px;
classDef rt fill:#1e2236,stroke:#9aa0b8,color:#fff,stroke-width:1.5px;
classDef sch fill:#15161f,stroke:#5a607c,color:#cfd3e6,stroke-width:1.2px;
Knowledge owns the truth · QMD indexes it · Hindsight is the shared working memory both runtimes read/write · GBrain/CASS are the optional extra layers · collectors + a nightly pass keep it fed.
tobi/qmd). Modes: lex (keyword), vec (semantic), hyde. Embeddings + rerank run remotely via OpenRouter so it's fast even on a tiny ARM box. The one layer where "vectors" exist — read-only retrieval, never the truth.