I’ve been building what I call my “Second Brain” - an Emacs-based knowledge management system that doesn’t just store notes, but actively helps me think. It’s built on org-roam, extended with semantic search via vector embeddings and proactive surfacing of relevant information. The goal isn’t to replace my thinking but to augment it - surfacing connections I might miss and nudging me toward follow-ups I’ve forgotten.

Why Emacs and Org-roam#

Before diving into what I’ve built, it’s worth explaining the foundation I chose.

Org-roam is a Zettelkasten-style note-taking system for Emacs built on top of org-mode. If you’re not familiar with Zettelkasten, it’s a method of interconnected atomic notes - each note captures one idea and links to related notes, creating a web of knowledge that grows more valuable over time. Org-roam provides the infrastructure: unique IDs for every note, bidirectional links (so you can see what links to a note, not just from it), and a SQLite database that makes querying thousands of notes fast.

But why Emacs? A few reasons:

Plain text that lasts. My notes are just .org files - plain text with some markup. I can read them with cat, grep them, version control them with git, and know they’ll be readable in 30 years. I’ve watched too many note-taking apps die, taking people’s knowledge with them. Plain text is forever.

Programmable to the core. Emacs isn’t just an editor - it’s a Lisp environment that happens to edit text. Everything is a function I can inspect, modify, or replace. When I wanted my notes to automatically generate vector embeddings, I wrote Elisp that hooks into the save process. When I wanted a daily digest of stale projects, I wrote functions that query the org-roam database. No waiting for features; I build what I need.

Org-mode’s depth. Org-mode has been refined for decades. It handles outlining, TODO management, time tracking, literate programming, and export to dozens of formats. Org-roam inherits all of this. My project notes can have actionable checkboxes. My blog posts export directly to Hugo. My daily journal uses capture templates. It’s not a note app trying to be everything - it’s a foundation designed for exactly this kind of extensibility.

Visual knowledge graph. Org-roam provides the ability to visualize relationships between notes as an interactive graph. With org-roam-ui, I can see my entire knowledge base rendered as a network - nodes representing notes, edges representing links between them. Hovering over a node shows its connections; clicking opens the note. This makes structural patterns visible: clusters of related ideas, isolated notes that might need integration, and hub notes that connect disparate topics. It’s one thing to know your notes are connected; it’s another to see the shape of your knowledge.

The Foundation: Structured Node Types#

Building on org-roam, my system organizes knowledge into typed nodes. Not everything is just a “note” - I distinguish between:

  • People - individuals I interact with, tracking context and follow-ups
  • Projects - active work with status tracking and next actions
  • Ideas - captured insights with one-liner summaries
  • Admin - life maintenance tasks with due dates
  • Blog posts - drafts that export directly to this site

Each type lives in its own directory and carries metadata appropriate to its purpose. A person node tracks when I last contacted them. A project node knows if it’s active, waiting, or blocked. This structure means I can ask questions like “which projects have gone stale?” or “who do I owe a follow-up?”

Proactive Surfacing: The Daily Digest#

The system doesn’t wait for me to ask. When I start Emacs, it shows me a daily digest:

  • Active projects with their next actions
  • Pending follow-ups (unchecked items mentioning people I track)
  • Stale projects (no activity in 5+ days)
  • Untracked people (names mentioned but not yet in my system)

This transforms org-roam from a passive archive into an active assistant. I don’t have to remember to check on a project - the system notices when something has gone quiet and brings it to my attention.

Here’s where it gets interesting. Every note in my system has a vector embedding - a numerical representation of its semantic content. When I’m working on a note, I can ask “what else in my knowledge base is similar to this?” and get results based on meaning, not just keyword matches.

The embeddings are generated locally using an OpenAI-compatible API (I run Infinity for embeddings and vLLM for generation). Each note section gets its own embedding, so I can find relevant chunks even in long documents.

This powers the link suggestion feature: when I’m editing a note, the system can identify related notes that aren’t already linked and suggest I connect them. It’s like having an assistant who’s read everything I’ve written and can spot patterns across thousands of notes.

Daily Auto-Linking: Connections Over Time#

My daily journal entries now automatically link to related content. When I save a daily note, the system finds semantically similar concept notes and other days with related content, then adds a “Related Notes” section.

This creates an emergent web of connections. A journal entry about debugging a GPU issue links to my notes on CUDA, related project notes, and a day from three months ago when I hit a similar problem. I didn’t have to remember that connection - the system found it.

Data Sovereignty#

Everything runs locally. My notes stay on my machines. The embedding model runs on my hardware. There’s no cloud service holding my knowledge graph hostage. I can grep my notes, back them up with rsync, and version control them with git.

This matters because a second brain is intimate. It contains half-formed thoughts, private reflections, and sensitive information. I’m not comfortable handing that to a third party, no matter how good their privacy policy sounds today.

What’s Next#

I’m continuing to develop this system. Current areas of exploration:

  • Better chunk-level search for finding specific passages in long notes
  • Integration with my health tracking data for correlating insights with biomarkers
  • Automated weekly reviews that synthesize what I’ve learned

The code is available at github.com/dcruver/org-roam-second-brain if you want to explore it yourself. It requires org-roam and access to embedding/generation APIs, but the core ideas could be adapted to other setups.

The goal isn’t to build the perfect note-taking system. It’s to build a system that helps me think better - one that remembers what I’ve forgotten, surfaces what’s relevant, and connects ideas across time.