cd /news/artificial-intelligence/how-to-build-an-ai-second-brain-with… · home topics artificial-intelligence article
[ARTICLE · art-59317] src=mindstudio.ai ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

How to Build an AI Second Brain with Obsidian and Claude Code: The LLM Wiki Method

Andrej Karpathy's LLM Wiki method proposes building a personal knowledge base optimized for AI reading and maintenance. A guide explains how to implement this using Obsidian for local Markdown storage and Claude Code for AI-driven updates, enabling a living knowledge base that can be queried and maintained by language models.

read15 min views1 publishedJul 14, 2026
How to Build an AI Second Brain with Obsidian and Claude Code: The LLM Wiki Method
Image: Mindstudio (auto-discovered)

Learn how to build an AI-maintained knowledge base using Obsidian and Claude Code, inspired by Andrej Karpathy's LLM Wiki architecture.

The Problem with Personal Knowledge Management (And Why AI Changes Everything) #

If you’ve ever tried to build an AI second brain, you know the frustration. You capture notes religiously, tag everything carefully, build elaborate folder structures — and then never actually use any of it. The information sits there, inert, while you still open a new browser tab whenever you need to remember something.

Andrej Karpathy, former head of AI at Tesla and one of the most respected researchers in the field, proposed a different approach. He called it the LLM Wiki: a personal knowledge base that’s not just stored but actively maintained and queried by a language model. Instead of a passive archive, it becomes a living document that an AI can read, update, and reason over.

This guide walks you through how to build that system using Obsidian as your knowledge layer and Claude Code as the AI brain that maintains it.

What the LLM Wiki Method Actually Is #

Karpathy’s core insight is simple: most knowledge management systems are optimized for humans to write into but are terrible for AI to read from. They’re full of inconsistent formatting, buried context, and implicit connections that only make sense to the person who wrote them.

The LLM Wiki approach flips this. You design the knowledge base so that a language model can navigate, update, and synthesize it effectively — which, as a side effect, also makes it more useful for you.

The key principles:

Flat, atomic notes— Each note covers one concept clearly and completely. No giant dump files.** Explicit linking**— Connections between ideas are written out, not implied.** Consistent structure**— Every note follows the same template so an LLM can parse it reliably.** AI-maintained freshness**— You don’t manually update everything. Claude Code reads your inputs and propagates updates across related notes.

Seven tools to build an app. Or just Remy. #

Editor, preview, AI agents, deploy — all in one tab. Nothing to install.

The result is a knowledge base that a language model can actually use as context — meaning you can query it directly, have Claude summarize what you know about a topic, or ask it to identify gaps in your understanding.

Why Obsidian Is the Right Foundation #

Obsidian works here for a few specific reasons that aren’t about hype.

It’s Just Files

Your entire Obsidian vault is a folder of Markdown files on your local machine. This matters enormously when you’re working with Claude Code. There’s no API to authenticate against, no proprietary format to parse. Claude Code can read, write, and reorganize Markdown files directly. Your vault is just a directory — and that makes it immediately accessible to any AI agent with file system access.

Bidirectional Links Are Machine-Readable

Obsidian’s [[wiki-link]]

syntax is plain text. A language model can parse it, follow it, and generate new links in the same format without any special tooling. When Claude Code processes your notes, it can legitimately traverse the graph — reading a note, following its links, and building a coherent picture of related concepts.

Local-First Means No Rate Limits or Sync Costs

Everything stays on disk. You’re not pushing gigabytes of notes to a cloud service on every sync. Claude Code operates directly on the file system, which keeps things fast and cheap. You only pay for the Claude API calls themselves, not for storage or transfer.

The Graph View Is a Debugging Tool

When you’re building an AI-maintained knowledge base, the Obsidian graph view becomes useful for something it was always marketed for but rarely used: spotting orphaned notes, unexpected clusters, and missing connections. It’s a visual sanity check on whether your AI’s edits are making structural sense.

Setting Up Claude Code for Your Vault #

Claude Code is Anthropic’s agentic coding environment. It runs in your terminal with access to your local file system, and it can read, write, and execute code directly. For knowledge base maintenance, this is exactly what you need.

Prerequisites

Before you start, you need:

Obsidian installed with a vault set up (any existing vault works, or create a new one)Claude Code installed via npm:npm install -g @anthropic-ai/claude-code

  • An Anthropic API key with access to Claude 3.5 Sonnet or Claude 3 Opus - Basic familiarity with your terminal

Granting File System Access

When you launch Claude Code from within your vault directory, it operates with access to that directory. Start a Claude Code session from your vault root:

cd ~/Documents/ObsidianVault
claude

Claude Code will ask what you want to work on. From here, you can point it directly at your notes.

Creating Your Base Template

Before Claude Code can maintain your vault consistently, it needs a template to follow. Create a file called _template.md

in your vault root:

---
title: 
created: 
updated: 
tags: []
related: []
---

## Summary
[One paragraph explaining what this concept is]

## Key Points
- 

## Connections
[Links to related notes and why they're related]

## Open Questions
[What I don't know yet about this topic]

## Sources
[Where this information came from]

Everyone else built a construction worker.

We built the contractor.

One file at a time.

UI, API, database, deploy.

This structure is deliberately designed for LLM consumption. The ## Connections

section forces explicit relationship documentation. The ## Open Questions

section is where Claude Code can flag uncertainty rather than hallucinating answers.

Building the Workflow Step by Step #

Step 1: Define Your Knowledge Intake Sources

The first decision is where your raw inputs come from. Common options:

Daily notes— A running log of things you read, learn, or think about** Clippings**— Articles or excerpts you save manually** Meeting notes**— Unstructured text from conversations** Voice memos**— Transcripts from tools like Whisper

For this workflow, we’ll use daily notes as the primary intake mechanism. Each day you write a freeform note about what you learned. Claude Code processes it nightly.

Step 2: Write a Processing Prompt

Create a file called _processing-instructions.md

in your vault. This is the system prompt you’ll give Claude Code for each processing run:


You are maintaining a personal knowledge base in Obsidian. 

When given a daily note:
1. Extract distinct concepts, people, tools, or ideas mentioned
2. Check if a note already exists for each one (search the vault)
3. If a note exists, update it with new information from the daily note
4. If no note exists, create one using _template.md
5. Add [[links]] between related notes
6. Update the `updated` frontmatter field on any modified notes
7. Do NOT invent information. If something is unclear, add it to ## Open Questions

Always preserve existing content unless explicitly correcting an error.

This prompt is your contract with the agent. Be specific. Vague instructions produce inconsistent edits.

Step 3: Run Your First Processing Session

Open a Claude Code session in your vault and give it a starting prompt:

Read _processing-instructions.md, then process the daily note at Daily/2025-01-15.md. 
Show me what files you plan to create or modify before making any changes.

The “show me before making changes” step is critical when you’re starting out. Claude Code will lay out its plan — which notes it intends to create, which it intends to update, what links it plans to add. Review this before approving.

After a few sessions, you’ll develop a feel for where it makes good decisions and where it needs more guidance. Refine your _processing-instructions.md

accordingly.

Step 4: Build a Querying Layer

Once your vault has a few weeks of processed notes, you can start querying it. Open Claude Code and try prompts like:

Read all notes tagged with "machine-learning" and give me a summary of 
what I currently know about this topic, including gaps identified in 
any ## Open Questions sections.

Or:

I'm preparing for a meeting about retrieval-augmented generation. 
Search my vault for relevant notes and synthesize what I know about 
this topic, citing the specific notes you're drawing from.

This is where the system pays off. Instead of manually searching your notes, you’re asking an AI to reason over your personal knowledge graph and give you a coherent briefing.

Step 5: Set Up a Maintenance Routine

The system needs a regular processing cycle to stay useful. A simple approach:

Daily— At the end of the day, run Claude Code on your daily note** Weekly**— Run a “gap analysis” pass where Claude Code scans for notes that should be connected but aren’t** Monthly**— Run a “staleness check” where Claude Code flags notes that haven’t been updated in 60+ days and may need review

  • ✕a coding agent
  • ✕no-code
  • ✕vibe coding
  • ✕a faster Cursor

The one that tells the coding agents what to build.

You can automate the daily run with a simple shell script triggered by a cron job:

#!/bin/bash
cd ~/Documents/ObsidianVault
TODAY=$(date +%Y-%m-%d)
claude --print "Read _processing-instructions.md, then process Daily/$TODAY.md. 
Apply all changes without asking for confirmation." >> logs/processing-$TODAY.log 2>&1

The --print

flag runs Claude Code non-interactively and outputs results to your log file.

Advanced Techniques for a Smarter Knowledge Base #

Versioned Frontmatter for Change Tracking

Add a version

field to your template frontmatter. Instruct Claude Code to increment it on each update. This gives you a lightweight audit trail — you can see at a glance how many times a note has been revised and whether it’s been recently maintained.

Confidence Scoring

Add a confidence: high/medium/low

field to your frontmatter. Tell Claude Code to set this based on the quality of sources in the note and whether there are unresolved Open Questions. When you query your vault, you can filter for high-confidence notes on a topic to avoid acting on uncertain information.

Synthesis Notes

Beyond atomic concept notes, create a category of “synthesis notes” — larger notes where Claude Code is explicitly asked to combine information across multiple atomic notes and draw connections. These are useful for topics where you’ve accumulated a lot of fragmented knowledge that you want integrated.

Prompt example:

Create a synthesis note for "transformer-architecture" that integrates 
everything across notes tagged with "transformers", "attention-mechanism", 
and "llm-architecture". Identify the three most important relationships 
between these concepts.

Contradiction Detection

Instruct Claude Code to flag contradictions between notes. When it updates a note with new information that contradicts existing content, it should add a ⚠️ Contradiction:

callout rather than silently overwriting. This keeps you in the loop on evolving understanding.

Where MindStudio Fits Into This Architecture #

The Obsidian + Claude Code setup described above is powerful but requires manual initiation. You’re running terminal commands, managing cron jobs, and keeping your processing instructions up to date. For many people, that friction is enough to derail the habit.

This is where MindStudio addresses a real gap. MindStudio is a no-code platform for building AI agents and automated workflows, and it’s particularly well-suited for wrapping knowledge management pipelines in reliable automation.

Scheduling Knowledge Capture Without Cron

Instead of managing shell scripts and cron jobs, you can build a MindStudio agent that runs on a schedule, pulls in your daily inputs (from email, Slack, a web form, or a connected tool), calls the Claude API with your processing prompt, and writes the results back to your vault via a file sync integration.

MindStudio has 1,000+ pre-built integrations — including Google Drive, Notion, and webhook endpoints — so you can connect your intake sources without writing glue code.

Multi-Model Processing Pipelines

One underappreciated benefit of MindStudio is that it gives you access to 200+ AI models out of the box. For a knowledge base pipeline, you might use a fast, cheap model (like Claude Haiku or GPT-4o mini) for initial extraction and tagging, then route complex synthesis tasks to Claude 3.5 Sonnet. MindStudio handles the routing logic visually, without you having to manage multiple API keys.

Triggered Knowledge Capture

Built like a system. Not vibe-coded.

Remy manages the project — every layer architected, not stitched together at the last second.

You can set up a MindStudio agent that triggers on an email. Forward any article or document to a specific address, and the agent automatically extracts key concepts, formats them to your vault template, and saves them as a new Obsidian note via Google Drive sync. No manual processing required.

For teams, this extends further — a shared MindStudio workflow means multiple people can contribute to a shared knowledge base without everyone needing Claude Code set up locally.

You can try MindStudio free at mindstudio.ai — most simple agents take under an hour to build with the visual editor.

Common Mistakes and How to Avoid Them #

Mistake 1: Starting With Too Many Notes

If you dump an existing, chaotic vault into this workflow, Claude Code will produce inconsistent results and you’ll get overwhelmed by the processing output. Start fresh, or process one section of your vault at a time.

Mistake 2: Trusting Claude Code Blindly

Always review the first few processing runs before running in “auto-approve” mode. Claude Code makes mistakes — it creates unnecessary duplicate notes, adds spurious connections, or misunderstands a concept. Your processing instructions need to be tight enough to catch these cases.

Mistake 3: Notes That Are Too Large

If individual notes run to thousands of words, you’ll run into context window issues when Claude Code tries to read and update multiple related notes in one session. Keep atomic notes under 500 words. If a topic is complex, split it into multiple linked notes.

Mistake 4: Ignoring the Open Questions Section

The ## Open Questions

section is the most valuable part of this system and the most neglected. Review it regularly. These are the gaps in your knowledge that Claude Code has flagged — they’re your learning agenda.

Mistake 5: Over-Automating Early

Fully automated pipelines are the goal, but get the manual workflow right first. Run Claude Code interactively for a few weeks before automating. You’ll learn what your processing instructions actually need to say.

Frequently Asked Questions #

What is the LLM Wiki method?

The LLM Wiki method is a knowledge management approach originally proposed by Andrej Karpathy. It involves structuring a personal knowledge base in a way that language models can navigate and maintain it — using flat Markdown files, explicit linking, consistent templates, and AI-powered updates. The goal is a knowledge base that an AI can actively reason over, not just search through.

Can I use a different AI model instead of Claude Code?

Yes. The Obsidian vault structure described here is model-agnostic — it’s just Markdown files. You can use any AI with file system access (including local models via Ollama) to process and update the notes. Claude Code is recommended because it’s particularly reliable for multi-file edits and has strong instruction-following in agentic tasks, but the architecture doesn’t require it.

How much does this cost to run?

The main cost is Claude API usage. A typical daily processing run (one daily note, 5–10 related notes updated) uses roughly 10,000–30,000 tokens with Claude 3.5 Sonnet, which costs approximately $0.03–$0.09 per run at current pricing. Monthly costs for a personal knowledge base are usually under $5. If you use a faster model like Claude Haiku for routine passes, costs drop significantly.

Is my data private with this setup?

Other agents ship a demo. Remy ships an app. #

Real backend. Real database. Real auth. Real plumbing. Remy has it all.

Your Obsidian vault stays local on your machine. The only data sent externally is what you pass to the Claude API — specifically, the content of the notes Claude Code reads during each session. Anthropic has an API data privacy policy that covers this. If privacy is a hard requirement, you can run a local model like Llama 3 via Ollama instead of the Claude API, keeping everything entirely on-device.

How is this different from just using ChatGPT or Claude to answer questions?

The key difference is persistence. When you ask ChatGPT a question, you get an answer but nothing is retained for future sessions. The LLM Wiki method maintains a structured knowledge graph that grows over time and reflects your specific understanding of topics. When you query it, the AI is reasoning over your accumulated knowledge — not just its training data.

Do I need to know how to code to set this up?

You need to be comfortable running terminal commands and editing text files. You don’t need to write code from scratch. The shell script for automation is copy-pasteable and minimal. If you want the no-code version of this workflow, the MindStudio approach described above handles the automation layer without requiring a terminal.

Key Takeaways #

  • The LLM Wiki method treats your knowledge base as a living document that an AI maintains, not just a passive archive.
  • Obsidian’s plain Markdown format makes it ideal for AI-assisted knowledge management — it’s just files, with no proprietary format to work around.
  • Claude Code can read, update, and cross-link your notes directly from the terminal, with processing instructions you control.
  • A consistent note template (with Summary, Key Points, Connections, and Open Questions sections) is what makes AI maintenance reliable.
  • Start manually, review Claude Code’s edits carefully, and automate incrementally once you trust the output.
  • For teams or fully automated pipelines, MindStudio can wrap this workflow in a scheduled agent with no-code tooling.

The difference between a knowledge base you use and one you abandon usually comes down to whether you can extract value from it without effort. Building an AI-maintained system with Obsidian and Claude Code is one of the more practical ways to close that gap. Start with a single daily note, run one processing session, and see what comes out — the architecture will make more sense in practice than in theory.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @andrej karpathy 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-build-an-ai-s…] indexed:0 read:15min 2026-07-14 ·