CBKS – A cognitive knowledge system, local-first
A self-built system with technical depth: event sourcing, graph cache, local LLMs and a brain-region-based agent model – fully offline, no cloud.

Classic knowledge stores — folders, wikis, static vector systems — hold knowledge in a fixed state. They show neither contradictions over time, nor the evolution of your own thinking, nor emotional weighting. So I built CBKS myself: sole conception, architecture and implementation — backend (FastAPI), CLI (Typer), 3D frontend (React + Three.js) and the entire local model stack.
Tech stack: FastAPI · SQLite · NetworkX · FAISS · Ollama · Qwen3 · bge-m3 · RX 6900 XT
Event sourcing instead of a snapshot
At its core sits event-sourcing-light: SQLite as the single source of truth, NetworkX as a volatile graph cache, FAISS (IndexFlatIP) for embeddings (bge-m3). Local LLMs via Ollama (Qwen3:8b, VLM qwen2.5vl:7b) drive specialised agents — prefrontal cortex, temporal lobe, limbic system, pineal gland, entity resolver. The frontmatter of notes and documents maps onto brain regions; a hemisphere split separates logic (left, analytical) from design (right, creative). A decay rate models long-term memory — knowledge fades in ranking without ever being deleted. Context engineering instead of naive vector search, all local-first on an RX 6900 XT.
What’s actually running
Actually implemented (Living Spec v1.2): 12 CLI commands, a REST API, a 3D graph with LOD, sentiment and contradiction analysis, entity dedup, German TTS and vault import — fully functional without any cloud. Model choice is driven by a custom benchmark rather than gut feeling.
What I took away from it
An append-only event log makes the system repairable: a “rebuild” replays everything from scratch, which is ideal after a model or schema change. FAISS IndexFlatIP beats IVF up to roughly 100k vectors — no training needed, clean deletes. And: keep the spec and code in sync as a living document, or both go stale.