Building a “Second Brain” – A Functional Knowledge Stack with Obsidian

Whilst I always enjoy the acquisition of knowledge, I’ve always struggled with depositing it usefully. From pen and paper notes with a 20 colour theme which lost value with each additional colour, to OneNote or iPad GoodNotes based emulations of pen and paper, it’s been a constant quest for the optimal note taking schema. Personally there are 3 key objectives I need my note taking to achieve:

  1. It must be digitally compatible and accessible from any device.
  2. It must comfortably handle math and images.
  3. It must be something I look forward to – the software needs to be aesthetically clean, lightweight with none of the chunkiness of Microsoft apps, and highly customisable.

For me the solution to this was Obsidian, the perhaps more cultified sibling to Notion. Obsidian is a note taking application that uses markdown with a surprising amount flexibility, including the ability to partner it with an LLM which I’ll explore in this blog, alongside my vault organisation do or dies, and favourite customisations.

Another great feature of Obsidian is that, unlike popular alternatives like Notion it is entirely local, existing simply as a folder of text files on your device. But it’s also easy to setup online syncing which I do for free via GitHub, treating my vault as a standard git repo.

Core Plugins

First are foremost are the community plugins which is argubly Obsidian’s unique selling point. Here’s my essentials:

  • Citation management using Zotero with the Zotero Integration plugin.
  • Terminal allows for running tools (such as Gemini CLI) within a window in Obsidian.
  • Templater for automating note templates.
  • Calender for entry ordering and navigation.
  • Agentic AI assistance with Obsidian Agent Client Protocol.

The terminal is particularly cool, for light coding tasks and agentic workflows it means you never have to leave Obsidian. To use the terminal in Obsidian just click the terminal icon in the far left of the sidebar to open the terminal after installing the plugin and choose the “integrated” option. This should open a terminal session in a new window in the app.

Structure

In case you need some inspiration for your own vaults I’ve organised my personal vault into 7 core folders as follows:

  • System
  • Reading
  • Learning
  • Projects
  • Blogs
  • Dailies
  • Appendix

The System directory houses things like a folder to store images I’ve attached to any notes that isn’t stored more permanently somewhere else (I usually prefer to link to images in real locations on my laptop for image inserts).

For the Appendix I had a grand ambition of storing a running glossary of key terms, a bible of ML and Immunology. I’m hoping to revive this with my agentic approach below so these files can also act as central link hubs on the knowledge graph where every mention of these glossary terms in any notes links back here.

Dailies is purely allotted to random daily thoughts note taking – the pinnacle of Obsidian-based intellectual wellness. The rest are pretty self explanatory and generally my day to day use is in the Projects folder where I note take for all my active research.

Customisation

With thousands of custom themes to choose from I tend to default to minimalist soft tones. My favourite daily use theme is the Things theme which I created a simple custom .css for to make the boldface gold instead of pink (i think it looks better in dark mode). Here’s the over-engineered brute force css snippet I use – you can simply add such snippets to a .css file in your .obsidian folder in your vault:

/* Preview mode (HTML <strong> / <b>) */
.markdown-preview-view strong,
.markdown-preview-view b {
  color: #e5c07b !important;
}

/* Headings in preview */
.markdown-preview-view h1 strong,
.markdown-preview-view h2 strong,
.markdown-preview-view h3 strong,
.markdown-preview-view h4 strong,
.markdown-preview-view h5 strong,
.markdown-preview-view h6 strong {
  color: #e5c07b !important;
}

/* Callouts / blocks (some themes use .callout or .callout-content) */
.callout strong,
.callout .callout-content strong,
.markdown-preview-view .callout strong {
  color: #e5c07b !important;
}

/* Editor — CodeMirror 6 (various class names some themes use) */
.cm-content .cm-strong,
.cm-strong,
.cm-formatting-strong,
.cm-formatting,
.cm-strong .cm-inline {
  color: #e5c07b !important;
}

/* Inline bold-italic combos */
.cm-strong.cm-em,
.cm-content .cm-strong.cm-em,
.markdown-preview-view strong em,
.markdown-preview-view em strong {
  color: #e5c07b !important;
}

Other themes I enjoy are the ITS theme for a more “notebook” style, LaTeX for that classic math aesthetic, and MaterialGruvbox or Sandstorm for a more muted yellow backdrop. If you’re a hardcore dark mode stan you might enjoy Obsidianite.

Agentic Note Taking with Local LLM Integration

Now let’s dive into the concept of “Second Braining”, a perhaps tiktokified term for enhancing productivity particularly through the use of LLMs. The goal is to have a local system setup for note taking that uses an LLM to agentically carry out some custom protocols that are typically a bit cumbersome, whilst being queryable as usual but with access to our entire personal knowledge base. For example one of the selling points of obsidian is the use of internal links to build a knowledge graph, however I can never be bothered to make these links when I’m in the flow of writing, so why not get an agent to comb through our notes and automatically link them based on its assessment.

With this in mind, I use a local LLM via ollama so my precious notes aren’t farmed by big tech (although this is much easier if you’re less conspiracist than me and don’t mind using the likes of Gemini CLI). Of course, hardware is the biggest constraint here but llama3 8B works quite comfortably on my Macbook M4 pro. For local LLM agentic behaviour my setup is as follows:

  • I have an Agents folder in my home dir to store the model weights, and a skills folder of skill markdown files for actions such as obsidian link identification and conversion prompts. I also have a directory of python scripts for model API interactions.
  • The skills files are symlinked to a separate skills folder in my obsidian vault for reference and direct editing.

If you want bigger scale models it’s quite possible now with the likes of airLLM to scale to hundreds of billions of parameters on 48GB of RAM. This is all done from the terminal within Obsidian. Even if you’re not interested in such agentic automations the perks of having your choice of LLM agent able to just read your local vault of notes as context injection can enormously increase your LLM-based productivity.

To be truly agentic the Obsidian Agent Client Protocol plugin is a wrap-around of the Zed IDE’s agentic client protocol service which allows for within Obsidian agentic chats, slash commands, note mentions (with a @notename), image attachment and things like chat export and terminal integration.

Particularly powerful is the support for “forking” conversations which is a method resetting the context window for improved responses with the context of the previous conversation.

Author