The Cortex is the architecture behind my personal AI infrastructure: a federated cognition system built from local ground truth, private context assembly, and on-demand access to a large reasoning model. It’s a four-layer stack, and each layer maps loosely onto a piece of a brain — which turns out to be a genuinely useful way to keep the responsibilities separate.

The core idea: memory lives here, on my hardware. Reasoning can be rented. The layer in between — the one that decides what leaves the building — is the whole point.

Layer 0 — the BIOS (the brainstem)

At the bottom is a small, human-curated registry of canonical system facts: node names, hardware specs, SSH aliases, network topology. It lives in a single version-controlled file, system_bios.md. Nothing in it is derived. Nothing is inferred. I update it by hand when reality changes, and it wins every conflict. If any other layer disagrees with the BIOS, the other layer is wrong. No drift tolerated.

Layer 1 — JARVIS Brain (the hippocampus)

Above that sits a personal vector database: structured captures from every working session — decisions, experiments, observations — embedded and retrievable by semantic similarity. The stack is FastMCP over Qdrant, with Voyage embeddings.

It’s not a log and it’s not a wiki. It’s a living episodic memory that indexes toward the BIOS as its canonical anchor: captures flow up into it, index queries flow back down to ground truth. Because captures accumulate over time, it also supports cross-temporal validation — checking what I believed then against what I know now.

Layer 2 — KIRA, the local LLM (the prefrontal cortex)

This is the key layer. KIRA is a local model running on my own hardware. On startup it loads the BIOS, so it’s system-aware from the first token. When a question comes in, it queries the hippocampus for relevant captures, assembles the context, and — critically — strips anything sensitive before any packet leaves the local network. It decides what gets delegated to an external model, and what never leaves the room.

The privacy boundary of the whole system lives here. Raw IPs, credentials, personal data, and project internals never pass this layer unreviewed. The cortex decides what to surface upward.

Layer 3 — Claude (extended cognition)

At the top is a large external reasoning model — available on demand, never running idle. Claude receives only the scrubbed, contextualized query the local cortex chooses to surface, contributes reasoning, synthesis, and generation, and holds no state between calls. It never sees raw system state.

The division of labor in one line: the cortex remembers; Claude reasons.

Why build it this way

Each layer does one thing. The BIOS is truth without inference. The Brain is memory without authority. KIRA is judgment about context and privacy. Claude is raw reasoning bandwidth without memory or access. Because the external model is stateless and only ever sees curated packets, I get the benefit of frontier-scale reasoning without shipping my life to it — and because ground truth is a hand-edited file, no amount of model confusion can quietly redefine what my systems actually are.

Where it stands

Node 0 of this architecture is my basement aquaponics lab. The design is explicitly meant to federate from there — the doc’s framing is that Node 1 and beyond can be grown by anyone with a Pi, each running their own sovereign copy of this stack. How the nodes talk to each other is its own design, covered in the companion page on the gossip protocol.

The cortex isn’t one big model — it’s a tiered local stack running under Ollama. A small ~3B model runs KIRA, the retrieve-reason-gate that decides what a query actually needs and what’s allowed to leave the node. A mid-size ~14B model runs cortex_watch, the always-on reflex that watches the corpus and proposes. Anything heavier escalates to a workstation GPU node. A dual-GPU node for 70–80B-class models is being brought up now — until it’s live, the big models are a capability on the bench, not a claim.