THE SECOND BRAIN
Thousands of notes, connected by meaning — a private knowledge graph, zero cloud
The Problem
Notes accumulate. Connections don't. A decade of thinking — research threads, project notes, half-finished ideas, reference fragments — sat in a flat vault. Full-text search worked when you remembered the exact word you wrote. It failed completely when you wanted to know what those thousands of notes said to each other.
The standard answer is a cloud knowledge tool with an AI search bar. The problem with that answer is the same as always: someone else holds the data, the model, and the query log. For a studio that processes its own thinking through autonomous agents, handing a decade of private notes to a third-party service was never on the table.
The Solution
Every note was embedded locally — meaning converted to a vector by a model that never phones home. Cosine similarity between every pair of vectors produced 9,271 meaning-edges: connections the author never drew, surfacing because the notes discussed the same concept, not because they shared a tag.
That graph feeds two surfaces. The first is a 2D WebGL render: sigma.js draws the pruned graph in the browser, Louvain community detection colors the 23 clusters, ForceAtlas2 places nodes so structure reads as shape rather than noise. The second surface is a local RAG endpoint — a question goes in, semantically relevant notes come back, an answer comes out. Everything runs on private, self-hosted hardware. No query leaves the building.
Nine thousand two hundred seventy-one connections the author never made — found by the embeddings in an afternoon.
Craft Details
The hairball problem. The first render was 9,271 edges. It was a hairball — visually impenetrable, impossible to navigate. The fix required three passes: prune to top-3 edges per node with cosine similarity at or above 0.52 (producing a graph of 4,259 edges), run Louvain community detection to assign 23 clusters, then apply ForceAtlas2 layout so community gravity pulls related nodes together. The resulting graph is legible. You can see the topics.
The 3D build. A second renderer was built in parallel: three.js with 3d-force-graph, bloom post-processing, and degree-scaled hub spheres. Nodes sized by connection count make the densest ideas visually dominant. Auto-orbit lets the graph breathe. Both renderers consume the same graph.json — one pipeline, two views.
Refresh pipeline. Updates are single-file. When notes change: re-embed the changed notes, rebuild graph.json, redeploy that file. No database migrations. No index corruption. The pipeline runs in Python with no external dependencies beyond the embedding model itself — the same design principle as keeping the inference and diffusion rigs decoupled.
Privacy stance. Private-network only, nothing exposed to the public internet, no query logging to a third party. The embedding model runs on the studio's own hardware. The RAG endpoint stays inside the private network. This is not incidental — it is the design constraint that determined every technology choice.
Stack
Result
The knowledge graph is live and queryable. The studio's autonomous agents have already mined it: 20 “greatest hits” ideas and 13 abandoned-but-now-buildable ideas were surfaced as written reports — things buried in the vault for years that the embedding pass connected to current infrastructure for the first time.
Retrieval precision and recall are UNMEASURED — the system is in active use, not benchmarked. Query latency is also UNMEASURED at writing. What is measured: thousands of notes, 4,259 rendered edges after pruning, 23 community clusters, 33 agent-surfaced idea reports across two mining passes.
A decade of notes is not a library. It's a mine. The embeddings are the shaft.
The architecture is also infrastructure. The same local embedding pipeline that built the knowledge graph feeds the inference rig's RAG surface — one model, one local deployment, two consumers. That reuse was not planned in advance; it emerged because the privacy constraint forced a local-first design from the start.