/ Karpathy LLM-OS · the architectural why

The transformer is a CPU.
Memory is disk.
Tools are peripherals.

Karpathy's framing for what we're really building. This page pulls forward BC's existing alignment work — three Karpathy primer docs, an active memory-dreaming workflow, and the brain/heart split — and maps it onto Joe's stack. The Made VPS already runs on this architecture; this page documents the alignment.

Sources: _shared/reference/KARPATHY_ALIGNMENT_BIOCREATIVE.md v1.2 (49 mentions) · KARPATHY_KG_LLM_PRIMER.md · KARPATHY_PHASE_2_ROADMAP.md · KARPATHY_LLM_WIKI_AND_4_RULES.md · _executive/BIOCREATIVE_BRAIN_INTERNALS.md · made-reporting-ux/CLAUDE.md v1.4 §Modular Context Map · Snapshot 2026-05-30


/01

Karpathy's 4-layer LLM-OS

Push knowledge out of weights and into retrievable memory. Use a smaller, cheaper, updatable model. Front-load structure into retrieval + skills. The transformer's job is reasoning, not knowing.

"Smaller model, bigger system. Better context, not bigger weights."

CPU

Frozen LLM

Joe's stack: Anthropic Claude (haiku-4-5 / sonnet-4-6 / opus-4-7). Different models for different tasks — haiku for cheap classification, sonnet for primary, opus for heavy reasoning.

BC's stack: Identical model family. Sonnet 4.6 default. Haiku for classification at $0.01/item. Opus for the council pattern.

RAM

Context window

Joe's stack: per-agent system_prompt + tool belt — well-defined in made-ai-os.agents. 40 distinct context recipes catalogued.

BC's stack: per-agent skills + retrieval + memories + citations, structured assembly. "Context is the new prompt."

Disk

Retrievable memory

Joe's stack: RAG Content DB (791,334 chunks, voyage-3 embeddings) + KG (10,426 entities · 11,849 relationships).

BC's stack: Two-tier disk extension — vector DB (semantic recall) + KG (relational recall) + Mem0 (episodic). Each query route uses a different mix.

Peripherals

Tools + skills + workflows

Joe's stack: 25 skills · n8n agentic workflows · MCP via Claude Desktop · Edge Functions.

BC's stack: 127 skills · 3 Pydantic AI agents (Market Intel, Client Prep, Content) · 25 n8n workflows · MCP servers · Heart VPS cron.


/02

5-tier memory hierarchy

BC's extension of Karpathy's "disk." He describes disk as one thing — we split it into 5 tiers, each with different cost/recall trade-offs. Joe has tiers L1, L4, L5 strong. L2 + L3 are the gaps to close.

Strength comparison · Joe vs BC

Tier 1

L1

Context window

Joe's instance

Per-agent system_prompt + tools (well-defined in 40 agents)

BC's instance

Skills + retrieval + memories + citations · structured assembly via Cascade

Tier 2

L2

Session memory

Joe's instance · GAP

Multi-user session memory profiles documented in design — runtime not yet wired

BC's instance

Mem0 user/session scoping on Hub DB · per-conversation persistence · agent_memory table

Tier 3

L3

Agent memory

Joe's instance · GAP

agent_memory + agent_memory_index tables exist (188 rows) · auto_dream candidate staging exists · runtime not yet wired

BC's instance

agent_memory table on Hub DB · Cognee + Neo4j knowledge graph · 50K+ stored relationships · per-agent persistent state

Tier 4

L4

RAG + KG

Joe's instance · STRONG

791,334 chunks · voyage-3 (1024-dim) · rerank-2 · brain-router-v3 · 10,426 entities + 11,849 relationships · hierarchical chunking · quality scoring

BC's instance

17K embedded chunks · Gemini 768-dim · Cohere rerank-v3.5 · brain-router 8-layer pipeline · 50K+ KG nodes

Tier 5

L5

Structured DB

Joe's instance · STRONG

Transfer DB · made-ai-os · Reporting DB · 4 large Postgres instances all live · ai_health_pulse 66K rows

BC's instance

Hub DB (200+ tables) · Brain DB · Heart DB · per-client schemas · Cortex master_plans


/03

The brain / heart split

BC's extension of Karpathy's framing. He collapses scheduled I/O into the same "peripherals" box as tools. We separated them into two VPSes because scheduled sync jobs have different operational needs than per-query tool calls. Reused for Made.

Brain VPS

LLM reasoning + RAG + agent runtime + memory. The thinker.

  • brain-api (Pydantic FastAPI)
  • LiteLLM proxy (model routing)
  • Cognee + Neo4j (knowledge graph)
  • Per-agent Pydantic services
  • Memory dreaming workflow (consolidation)
  • Council pattern (multi-model judging)

For Made: provision Made VPS or guest tenant on BC Brain VPS

Heart VPS

Scheduled syncs + cron jobs + n8n orchestration. The pump.

  • n8n self-hosted (no plan limits)
  • Cron jobs (every 6h, every 2h, nightly)
  • Edge Function callers
  • Sync runners (Salesforce, HubSpot, Monday, PandaDoc)
  • Heartbeat log + observability
  • Webhook receivers

For Made: Joe's existing infra IS the heart layer (Mac mini launchd + n8n + EFs). The split already exists implicitly.


/04

Memory dreaming

The offline consolidation loop. Nightly background pass that summarizes high-volume facts, prunes stale, reinforces useful. BC has this running. Joe has CURATOR designed for it.

"Sleep on it. The brain doesn't compress at write-time."

BC: live

memory-dreaming.json (n8n)

Weekly Sunday workflow. Reads the past 7 days of agent_memory candidates, runs an LLM consolidation pass, promotes high-confidence learnings, prunes low-signal noise.

  • · memory-dreaming.json — n8n workflow definition
  • · dream-nightly.sh — KB VPS launchd job
  • · dream-operator.sh — operator-triggered consolidation
  • · Writes to agent_memory + agent_memory_index
Joe: designed

CURATOR (knowledge-platform fleet)

Joe's analog. Currently draft in made-ai-os.agents. Triggered weekly Sunday 04:00 ET. Reads agent_memory_candidates → consolidates → writes to agent_memory.

Tier 2.2 in 12_AGENT_PORTING_ROADMAP.md → "joint dream cycle" with BC.

Joint dream cycle proposal

BC's dreaming workflow already runs nightly. Joe's CURATOR is fully designed and waiting for the runtime. Plan: BC ports its memory-dreaming.json to call Joe's agent_memory_candidates table after the standalone Pydantic runtime stands up on the Made VPS. Cycle runs nightly across both sides. Each side keeps its own scope (BC's clients vs Made's commercial ops) but the consolidation logic is shared.

Closes the "joint dream cycle" gap from 10_GAPS_BOTH_SIDES.md.


/05

Pydantic AI = ReAct made operational

Frozen Sonnet → tight tool belt → ReAct loop (reason → call tool → observe → reason). This is Yao et al. 2022 executed in our stack. BC has 3 live Pydantic agents proving the pattern. Joe's 40 agents move through the same template.

"Software 3.0 — skills + agents + workflows attached to a constant LLM."

Market Intel Director

BC live · port template

Frozen Sonnet · 12 tools (search, classify, score, sync) · ReAct loop · writes to client_news_intelligence.

Client Prep Director

BC live · port template

Frozen Sonnet · meeting prep + briefing sheet generation · ReAct loop · MCP-exposed.

Content Director

BC live · port template

Frozen Sonnet · brand voice + draft + publish · pairs with Marketing Director · 11 active scopes.

For Joe's fleet: the same Pydantic AI ReAct pattern. CHIEF goes first (orchestrator at apex of reports_to). Then MADE BRAIN (lift heavy reasoning out of n8n into Pydantic). Then the rest, fleet by fleet, agent by agent. See the Project Mgmt fleet map for the operationalization path.


/06

The llm-wiki three-layer pattern

Karpathy's gist (April 2026) named what BC was already doing. Three layers: corpus, wiki, schema. Both Made and BC live this pattern.

Layer 1

The corpus

Raw source material — what the LLM consumes.

Joe: 791,334 chunks across 15,210 docs in RAG Content DB. 69 Fellow.ai meeting transcripts.

BC: 17K chunks across Hub DB. Per-client research outputs. PubMed + grants + trials.

Layer 2

The wiki

LLM-written, LLM-maintained markdown layer. Summaries, entity pages, concept pages, cross-references. "You read it; the LLM writes it."

Joe: per-agent SKILL.md cards · domain_rules · employee_profiles · department_profiles. Currently human-maintained.

BC: _shared/reference/*.md primers · _executive/*.md canon · per-department CLAUDE.md · per-client CLIENT_CONTEXT.md / OPPORTUNITY_SUMMARY.md. Currently human-maintained — LLM-driven write-back is the 2026-Q3 gap.

Layer 3

The schema

The disciplined-maintainer instruction set. CLAUDE.md / AGENTS.md. Tells the LLM how to run the wiki. Co-evolves with the wiki.

Joe: AGENTS.md adoption spike (rank 4 in build queue) · 25 SKILL.md files · 18 skill_gap_candidates · skill_links many-to-many.

BC: Root CLAUDE.md + per-department CLAUDE.md + _executive/soul.md + .windsurf/rules/*.md + skills index.


/07

When it all clicks

The vision when the Made VPS is up, the agents are ported, and the memory hierarchy is fully wired.

→ Runtime

Made VPS hosts BC-built agents today (Made-Ralph, Account Brief). Target: Pydantic FastAPI services for Tier 1 agents (CHIEF, MADE BRAIN). Mac mini keeps launchd. n8n + EFs stay.

→ Memory

L1-L5 fully wired. Per-user session memory. Per-agent persistent memory. Knowledge graph reasoning live.

→ Dreaming

Joint dream cycle nightly. Both sides consolidate. Stale facts pruned. High-signal learnings reinforced.

→ MCP-exposed

Every agent callable from Windsurf · Claude Desktop · Made App · Reporting UX. Same surface, multiple entry points.

→ Observable

ai_health_pulse already running (66K rows). Eyes Dashboard surfaces it. Joint observability — BC adopts Joe's schema.

→ Updateable

Wiki (LLM-written, human-reviewed). Schema (CLAUDE.md / AGENTS.md). The corpus stays raw. The whole system co-evolves.


/08

Source documents

All BC canon. Pull these forward — they're the substrate this page summarizes.

_shared/reference/KARPATHY_ALIGNMENT_BIOCREATIVE.md _shared/reference/KARPATHY_KG_LLM_PRIMER.md _shared/reference/KARPATHY_PHASE_2_ROADMAP.md _shared/reference/KARPATHY_LLM_WIKI_AND_4_RULES.md _executive/BIOCREATIVE_BRAIN_INTERNALS.md _executive/BIOCREATIVE_HEART_AND_NERVOUS_SYSTEM.md _executive/made-partnership/11_BRAIN_FOR_BRIAN_PHASE_PLAN.md _executive/made-partnership/12_AGENT_PORTING_ROADMAP.md _executive/made-partnership/15_BRAIN_FOR_MADE_PHASE_A1.md _shared/reference/BRAIN_VSP_SCHEDULED_JOB_PATTERNS.md departments/internal-ops/n8n-workflows/memory-dreaming.json departments/agent-brain/deploy/brain/scripts/dream-nightly.sh departments/agent-brain/deploy/brain/scripts/dream-operator.sh _shared/brands/biocreative/diagrams/deep-dives/deepdive_memory_hierarchy.excalidraw

Related views