How Cornelius Works
A multi-layered knowledge management system: an agent-within-an-agent architecture that transforms Claude Code into a specialized second-brain operator.
Cornelius AI Agent — Architecture Explained
Jul 2026
Cornelius & the Brain Orb
Jul 2026
I Gave My AI Agent an Unconscious Mind
Jun 2026
The layer cake
Each layer specializes the one above it. CLAUDE.mdturns a general Claude Code session into the Cornelius agent; sub-agents and skills give it task-specific capabilities; two engines — Local Brain Search and the Brain Dependency Graph — sit between the agent and your notes.
┌─────────────────────────────────────────┐ │ Human (You) │ ├─────────────────────────────────────────┤ │ Claude Code │ ← General AI assistant ├─────────────────────────────────────────┤ │ Project Cornelius Agent │ ← Specialized for knowledge work │ (Defined by CLAUDE.md) │ ├─────────────────────────────────────────┤ │ Specialized Sub-Agents │ ← Task-specific capabilities │ (vault-manager, connection-finder...) │ ├─────────────────────────────────────────┤ │ Brain Dependency Graph (BDG) │ ← Directed graph with staleness, │ (7 semantic layers, lifecycle) │ lifecycle, and tension tracking ├─────────────────────────────────────────┤ │ Local Brain Search (FAISS) │ ← Vector search + memory engine ├─────────────────────────────────────────┤ │ Your Knowledge Base │ ← Your actual "brain" │ (Obsidian Vault/Brain) │ └─────────────────────────────────────────┘
The vault
Your knowledge base is a plain Obsidian vault of Markdown files — a Zettelkasten structure in Brain/. Folders mark stages in the refinement pipeline, and AI-extracted notes live apart from your own so provenance stays visible.
Brain/ ├── 00-Inbox/ # Quick capture, unprocessed notes ├── 01-Sources/ # Literature notes, references ├── 02-Permanent/ # Atomic, evergreen notes (CORE) ├── 03-MOCs/ # Maps of Content ├── 04-Output/ # Articles, frameworks, insights │ └── Articles/ # Each article in own folder ├── 05-Meta/ # System notes, changelogs ├── AI Extracted Notes/ # AI-extracted from YOUR content ├── Company/ # Reference scopes - entity records (created by ref-* skills) └── Document Insights/ # AI-extracted from external content
Knowledge flows through the stages:
CAPTURE → PROCESS → ORGANIZE → SYNTHESIZE → CREATE Inbox → Sources → Permanent → MOCs → Output
The core principles: atomic notes (one idea per note, well-linked), your words (not copy-paste from sources), rich links (connect everything with [[wiki-links]]), regular discovery, and active synthesis. The structure is a starting point — see FOLDER-STRUCTURE.md for the purpose of each folder, optional folders, migration from Roam, Logseq, Notion, Evernote, or OneNote, and a daily/weekly/monthly/quarterly maintenance rhythm.
The loop: capture to endorsement
Cornelius compounds by running the same loop over and over — much of it on a schedule when it runs on Trinity:
Local Brain Search
The memory engine: FAISS-powered vector search with a SYNAPSE-inspired memory architecture. It runs locally via bash scripts — fast, local, no API calls, and not an MCP server.
raw_similarity always shows the unadjusted score)# Semantic search (static mode - fast) ./run_search.sh "dopamine motivation" --limit 10 --json # Spreading activation search (better for synthesis queries) ./run_search.sh "how does dopamine relate to decision making" --mode spreading --json # Find connections / graph analytics ./run_connections.sh "Note Name" --json ./run_connections.sh --hubs --json ./run_connections.sh --bridges --json # Re-index after changes ./run_index.sh
The Brain Dependency Graph
A directed, mode-aware dependency graph layered on top of Local Brain Search. Every relationship has direction (who's authoritative), mode (generative vs reflective), and type (derives-from, instantiates, references, associates, tension, supersedes).
Seven semantic layers:signal (1) → impression (2) → insight (3) → framework (4) → lens (5) → synthesis (6) → index (7).
Skills drive it: /propagate-change, /compute-lifecycle, /detect-tensions, /coherence-sweep, and /brain-merge. Details in BRAIN-DEPENDENCY-GRAPH-ARCHITECTURE.md.
Provenance and governance
Every note records who authored the thinking — you, an external source, or the AI. Several mechanisms keep that distinction meaningful:
primary · credible-interpreter · discovery-tier · rejected— a web allowlist, and reject patterns. A discovery-tier source can raise a question but never settle one./advise, /decide, and crystallization run an epistemic inversion (pre-mortem with a concrete falsifier), an attractor check (is this conclusion just the gravity of your most-linked notes?), provenance weighting, and a reference-class anchor for any estimate.Reference scopes: a CRM layer inside the brain
Alongside your insights, Cornelius keeps mutable, freshness-stamped entity records — people, organizations, products, engagements, watched competitors — in separately mountable sub-scopes under Brain/Company/.
provenance: reference, temporal validity, and per-type freshness SLAsEight skills maintain them — see the Reference data group in the skills catalog.
Sub-agents
Ten specialized sub-agents ship in .claude/agents/:
| Agent | Purpose |
|---|---|
vault-manager | Create, read, update, delete notes with proper metadata |
connection-finder | Find hidden relationships between notes (user-directed) |
auto-discovery | Autonomous cross-domain connection hunter |
insight-extractor | Extract insights from YOUR content (conversations, transcripts) |
document-insight-extractor | Extract insights from EXTERNAL content (papers, books) |
thinking-partner | Brainstorming and ideation support |
diagram-generator | Create Mermaid visualizations |
local-brain-search | FAISS-powered semantic search and graph analytics |
research-specialist | Deep research with web search |
epub-chapter-extractor | Extract content from ebooks |
On Trinity
Always on, with receipts
On Trinity, Cornelius runs in an isolated container with cron scheduling, real-time monitoring, and agent-to-agent delegation — so the incubation loop, domain watch, and research run on a schedule, and the rest of your fleet can consult it.
The Brain Orb
A live 3D visualization of the knowledge base on the agent's Brain tab, with scope mounting (per-book sub-scopes included), voice-drivable KB search, and capture/link/refresh actions that write back into the vault. The seeded knowledge base renders out of the box (data.seed.json); the hook contract ships in .trinity/brain-orb/. It requires a Trinity base image from 2026-07 or later, with the platform's Brain Orb flags enabled.