Building the Brain: A Second Brain Your AI Can Read
Every AI assistant has the same blind spot: it doesn’t know you. It doesn’t know your job, your house, your projects or what you decided last month, so you re-explain the same things in every conversation, and it still guesses. What’s missing is a second brain for AI.
The fix isn’t a smarter model. It’s giving the model something to read. Before I set up an always-on agent, I built a second brain: a personal wiki of plain text notes that I can read in Obsidian and my AI can read directly. It’s the knowledge everything else in this build works from, and it’s useful on its own before any agent touches it.
This is guide 1 in the series I introduced in Why Build Your Own AI Assistant. It covers what the wiki is, why it’s built from Markdown, how your AI uses it (a simple form of RAG, retrieval-augmented generation), and how to set one up from an empty folder to a private, backed-up repo, step by step.
THE SHORT VERSION //
- Plain Markdown files in one folder. No database, no lock-in, readable by any app or agent.
- It’s RAG, the simple way. Your AI looks up the right notes before it answers.
- One index and one instructions file tell your AI where things live and what it’s allowed to change.
- A private Git repo keeps every version and is how agents get a copy later.
- About half an hour to set up. Then it grows one note at a time.
Make it yours
A wiki has many uses: a personal knowledgebase for your finances, work, home and projects, documentation for a team, research and study notes, a reading log, world-building for your writing, recipes, or runbooks for a homelab or small business. The same approach works for all of them.
The structure in this guide is a template, not a set of rules. Keep the folders that fit, rename or drop the rest, and add your own. It should match how you think and what you want your assistant to know.
What is a Markdown file?
A Markdown file (.md) is a plain text file with a few simple symbols for formatting. A # at the start of a line makes a heading, - makes a bullet, **bold** makes bold text, and [text](https://example.com) makes a link to a website. You can open it in any text editor and read it as-is, or open it in an app like Obsidian and see it neatly formatted.
# Home Maintenance
## Furnace
- Filter size: 16x25x1
- Last changed: 2026-09-15
- **Next:** every 90 days
See also [[Home Information]].
That’s a complete note. There’s no hidden formatting, no special file format and no app required to read it.
Links between notes
The [[Home Information]] line above is a wiki link: double square brackets around the name of another note. In Obsidian, clicking it opens that note. Two forms cover almost everything:
[[Home Information]]links to the note namedHome Information.md, wherever it is in your notes.[[Home Information|our house]]links to the same note but displays “our house”.
Links turn a folder of files into a connected web of knowledge, and they’re how an agent follows a trail from one note to the next.
Why Markdown works best for an AI second brain
- AI reads it natively. Language models are trained on huge amounts of Markdown and understand its headings, lists, tables and links. An agent reads a note directly, with no conversion step, and plain text uses far fewer tokens than a Word document or PDF holding the same information.
- It’s just text, so it lasts. Any computer can open a text file today and decades from now. Your notes don’t depend on any company, app or subscription staying around.
- No lock-in. The editor is just an editor. Your notes are ordinary files, so you can open them in VS Code or Notepad, or read them on a server with nothing installed.
- Git tracks every change. Because notes are text, Git shows exactly which lines changed and when: full history, line-by-line comparisons and easy restores. That doesn’t work well with binary formats like
.docx. - Easy to search. Any tool can search plain text, and an agent can find what it needs in a large wiki in a fraction of a second.
- Small and fast. Thousands of notes take up a few megabytes, sync in seconds and back up for free.
- Humans and agents use the same file. I edit a note in Obsidian, Claude edits it in conversation, and Hermes reads it on my home server. Everyone works from one copy, with nothing to export or keep in sync.
The notes are ordinary files you own. Every app and every agent is just a way of reading them.
Organizing it with Obsidian
Obsidian is the app I use. It’s a free note-taking app that works directly on a folder of Markdown files on your computer. Obsidian calls that folder a vault: you pick a folder, and every note inside it becomes part of the vault. Obsidian keeps its own settings in a hidden .obsidian folder at the top of the vault.
On top of the files it adds a clean editor, wiki links, backlinks (every note that points to the one you’re reading), a graph view of how notes connect, fast search, templates and a big library of community plugins, including the Git plugin used for backup below.
The tools
| Tool | Role | Why |
|---|---|---|
| Obsidian | Where the notes live and get edited | Plain Markdown in a local folder, so any tool or agent can read it |
| Git and a private GitHub repo | Version history and off-site backup | Every change is recorded and can be rolled back |
| Obsidian Git plugin | Commits and pushes automatically | Backup happens without remembering to do it |
| Syncthing | Keeps a live copy of the notes on the agent’s server | Changes arrive in seconds over your home network, and the server can’t send edits back |
| Claude | Designs and builds the brain with you | Interactive work where judgment matters |
| Hermes Agent | Reads the brain and runs unattended jobs on a home server | Covered in guide 2 |
Claude: bootstrapping the wiki
Claude does the hands-on work of turning the idea into a working knowledgebase, in conversation, with you reviewing each step. It adapts the folder structure to your needs, drafts the instructions file agents read first, builds the first notes from what you tell it and from documents you share, and keeps the index and links current as the wiki grows. It’s the only agent that edits the notes; the unattended agents later in the series only read them.
How Claude gets to your notes. There are three ways, and which ones you have depends on your plan:
- Claude desktop app: give Claude access to your vault folder, and it reads and edits notes in place while you watch.
- Claude Code: start it from your vault folder and it reads
CLAUDE.mdautomatically. If your wiki is a subfolder (as below), put a one-lineCLAUDE.mdin the vault root containing@Wiki/CLAUDE.md, so Claude Code loads the real file. - Claude in the browser, including the free plan: Claude can’t see your files. Paste a note into the chat, ask for changes, and paste the result back into Obsidian.
The free version is enough to start. You can design the structure, draft the instructions file and write your first notes by copying and pasting. The free plan has lower usage limits, so work in focused sessions, and upgrade only if you keep hitting them. Prefer a different assistant? The same approach works; many other AI tools look for a similar instructions file, often called AGENTS.md.
How AI uses your second brain: RAG
RAG (retrieval-augmented generation) means an AI looks up relevant information first, then writes its answer from what it found, instead of relying only on what it learned in training. Retrieval is the lookup, augmented means the found text is added to the request, and generation is the answer.
Why it matters: a model doesn’t know your life, its training stops at a cutoff date, and it can’t hold everything you know in one request. RAG hands it the right few pages at the right moment, and because the answer is based on your notes, it makes less up.
Here’s how that looks with this wiki:
- You ask: “When did I last change the furnace filter?”
- Retrieve: the agent reads
CLAUDE.md, the Where things live table points it toHousehold/, and it opensHome Maintenance.md. - Augment: that note goes into the request alongside your question.
- Generate: “September 15, 2026. The next change is due around mid-December.”
RAG hands the model the right few pages at the right moment, so it answers from your notes instead of guessing.
Do you need a vector database for RAG?
Many RAG systems split documents into chunks, turn each chunk into an embedding (a list of numbers that captures its meaning) and store them in a vector database, then search by similarity. That pays off for huge collections or vague questions. A personal wiki doesn’t need it to start: the index, the Where things live table and plain text search do the retrieval, and the agent reads whole notes. There’s nothing extra to build or keep in sync. If your wiki grows to thousands of notes, you can add vector search on top later without changing a single note.
Build it
Six steps, in order. The first four take about half an hour. The brain starts to fill in at step 5, and you’ll keep coming back to it.
Step 1: Install Obsidian and create a vault
- Download Obsidian and install it.
- Open it and choose Create new vault. Name it (for example
Vault) and pick where it lives, such as your Documents folder. - Obsidian opens an empty vault. That folder on disk is now your vault.
Step 2: Create the folder structure
Inside the vault, create a folder called Wiki. Everything that matters goes inside it. The Git repo in step 6 backs up the whole vault, Obsidian settings included, but keeping your notes in their own subfolder means you can share just Wiki with an agent later and nothing else. It also leaves room for other top-level folders, like a work wiki, that you back up the same way but share differently.
Make it fit your life
This is just one way I use my wiki. The structure below is how I organize mine, built around my personal life. If you’re building one around a business, yours may look completely different: folders like Clients/, Products/, Operations/, Marketing/ and SOPs/ instead of Household/ and Hobbies & Interests/. Everything else in this guide works the same either way. Change the folders, then update the Where things live table in CLAUDE.md to match.
Create the folders
Create these folders inside Wiki (right-click → New folder in Obsidian, or use your file manager), keeping only the ones that fit you:
Vault/
├── .gitignore What Git skips (step 6)
├── .obsidian/ Obsidian's settings and plugins (backed up too)
└── Wiki/
├── CLAUDE.md Instructions for AI agents (step 3)
├── README.md What the wiki is and how it's backed up
├── Index.md Map of content: start here (step 4)
├── Finances/
├── Work/
├── Household/
├── Identity/
├── People/
├── Health/
├── Ideas/
├── Hobbies & Interests/
├── To Dos/
├── Systems/
├── _Templates/
└── _Archive/
| Folder | What goes in it | Example notes |
|---|---|---|
Finances/ | Accounts, budget, bills, income, investing, retirement, taxes | Accounts, Monthly Budget, Monthly Bills, Goals |
Work/ | Jobs, contracts, career and job search | Current Jobs, Resume, Application Profile |
Household/ | The house, maintenance, insurance, vehicles | Home Information, Home Maintenance, Vehicles |
Identity/ | A one-page profile, background, goals, a list of family and friends | Me, Background, Goals and Vision |
People/ | One note per important person in your life | <Name> |
Health/ | Fitness routines and the basics you’d want an assistant to know | Health & Fitness |
Ideas/ | Backlogs that aren’t projects yet | Business Ideas, Travel Ideas |
Hobbies & Interests/ | Gaming, music, TV, other interests | Interests |
To Dos/ | Private to-do lists | <Topic> Tasks |
Systems/ | Homelab, network, server runbooks, and notes about the wiki itself | Home Network, Server Setup, Backup |
_Templates/ | Note templates for Obsidian’s Insert template command | New Note |
_Archive/ | Finished or cancelled trips and projects, kept for reference | <Trip>, <Project> |
- The leading underscore sorts
_Templatesand_Archiveto the end and marks them as “not live notes”. README.mdis for people, not agents: two or three lines on what the wiki is, where it’s backed up and how to restore it.- Turn on templates. In Obsidian, open Settings → Core plugins → Templates, turn it on, and set Template folder location to
Wiki/_Templates. A New Note template with a title line and a “Related” section at the bottom is enough to start. - Start flat. Add subfolders only when a folder gets crowded, and record them in
CLAUDE.mdso agents can find them.
Folder tips
Step 3: Write the instructions file
CLAUDE.md is the first thing an agent reads. It tells the agent what the wiki is, where things live and what it may change. Keep it short and specific. Claude can draft it with you; here’s a starting point to adapt:
# Wiki Instructions
## What this is
My personal wiki: plain Markdown notes in Obsidian, backed up to a private
GitHub repo (<github-user>/wiki).
## Where things live
| Request is about | Look in |
| --------------------------------- | ------------------ |
| Money, bills, budget, taxes | `Finances/` |
| Jobs, resume, career | `Work/` |
| House, maintenance, cars | `Household/` |
| Me, my goals, family list | `Identity/` |
| A specific person | `People/<Name>.md` |
| Homelab, servers, this wiki | `Systems/` |
If the table doesn't answer it, read `Index.md`.
## Finding things
- Open only the notes a request needs.
- Skip `.git/`, `.obsidian/` and `_Archive/` unless I ask.
## Editing
- Don't overwrite content or invent data. Leave empty `- ` placeholders alone.
- Don't delete or rename notes without asking.
- Never write passwords, keys, or full account or ID numbers into a note.
- Add every new note to `Index.md` and link it from at least one related note.
## Working with me
- Be direct and brief.
- If a note contradicts what I just said, quote the line and ask which is current.
- For long commands, send output to a log file and show only errors and the last lines.
What each part does:
- Where things live maps each kind of request to a folder. The agent checks this table first and reads the full index only when the table doesn’t answer the question, so it doesn’t open notes it doesn’t need. It’s the retrieval step of RAG: it tells the agent where to look before it answers.
- Finding things keeps agents out of folders that waste tokens or hold old material.
- Editing sets the rules that protect your notes. The sensitive-data rule matches the “what not to put in it” table below.
- Working with me is how you like to work. When a note and what you just said disagree, the agent asks instead of quietly picking one.
- The last line keeps an agent from flooding its context with the output of long installs or builds.
Point the agent at a map, not the whole territory. It reads less, costs less and pulls fewer private notes into jobs that don’t need them.
Step 4: Create the index
Index.md is the map of content: one section per folder, each opening with a one-line description, then a link to every note in it.
# Index
## Finances
Money: accounts, budget, bills and taxes.
- [[Accounts]]
- [[Monthly Budget]]
## Household
The house, maintenance, insurance and vehicles.
- [[Home Information]]
- [[Home Maintenance]]
- Every new note goes into the index and gets linked from at least one related note, so nothing is orphaned.
- Links to notes that don’t exist yet are fine. Obsidian shows them faded, and clicking one creates the note.
Step 5: Write your first notes with Claude
Before you start, read “What not to put in your second brain” below, so nothing sensitive goes in from day one.
Start with the notes that pay off most, usually a one-page profile of yourself (Identity/Me.md), then your home, work and finances. Let Claude interview you instead of writing from a blank page. Here’s a starter prompt:
I'm building a personal wiki in Obsidian. The folder is <path-to-your-vault>/Wiki
and it already has the folder structure, CLAUDE.md and Index.md. Read CLAUDE.md
first. Then interview me one topic at a time, starting with Identity/Me.md: ask
a few questions, write the note from my answers, and add it to Index.md. Don't
invent anything I haven't told you.
- Share documents too: a lease, a benefits summary, an insurance declarations page. Ask Claude to pull out what matters into a short note, and keep the original file somewhere else.
- On the free plan, paste Claude’s draft into a new note in Obsidian yourself, then add the link to
Index.md. - Don’t try to fill everything at once. Add a note whenever you find yourself looking something up twice.
Step 6: Back up to a private Git repo
Git is a version-control tool: it records every change to your notes so you can see what changed and roll anything back. GitHub hosts a copy of that history online, which doubles as your backup and is how agents get a copy of the notes later. A private repository is visible only to you and the people or keys you allow. Your wiki holds personal and financial details, so never make it public.
Install and set up Git
1. Install Git. Pick your system:
- Windows: install Git for Windows or run the command below. It includes Git Credential Manager, which handles signing in to GitHub.
- macOS: run
xcode-select --installorbrew install git. - Linux: install
gitfrom your package manager.
winget install --id Git.Git -e
2. Tell Git who you are. You only do this once per computer, and it goes on every commit:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Create the repo and push
3. Create the repo on GitHub. Make a free account at GitHub if you don’t have one. Click + → New repository in the top-right corner, name it (for example wiki), set visibility to Private, and leave Add a README unchecked.
4. Add a .gitignore file at the top of the vault (next to .obsidian) to keep clutter and per-device files out of the repo:
# Operating-system clutter
.DS_Store
Thumbs.db
desktop.ini
# Obsidian: keep settings and plugins, skip each device's window layout
.obsidian/workspace*.json
.trash/
# Syncthing (see "Give your agent a live copy" below)
.stfolder/
.stignore
.stversions/
*.sync-conflict-*
5. Turn the vault into a repo and push it:
cd "<path-to-your-vault>"
git init -b main
git add -A
git commit -m "First commit"
git remote add origin https://github.com/<github-user>/vault.git
git push -u origin main
The first push asks you to sign in, and GitHub doesn’t accept your account password here. On Windows, Git Credential Manager opens a browser window; approve it there. On macOS or Linux, install the GitHub CLI, run gh auth login once before pushing, and answer yes when it asks to authenticate Git.
Turn on automatic backups
6. Install the Obsidian Git plugin. In Obsidian, open Settings → Community plugins and choose Turn on community plugins. Then select Browse, search for Git, and install and enable Obsidian Git. In the plugin’s settings, set the automatic commit-and-sync interval (every 10 to 15 minutes works well) so backups happen on their own. Leave Custom base path empty, because the repo is the vault itself, and make sure push isn’t disabled, or commits never leave your PC.
7. Check it worked. Refresh the repo page on GitHub. Your notes should be there, with a Private label on the repo.
Stuck? GitHub’s guide to creating a new repository walks through it with screenshots. Or ask Claude: tell it your operating system and where your vault lives, and it can explain each step, write the exact commands and help you fix errors along the way.
Restore an older version
Every commit is a restorable version. On GitHub, open the file and select History. Or locally, from the vault folder:
git log --oneline --follow -- "Wiki/Finances/Goals.md" # versions of a note
git checkout <commit> -- "Wiki/Finances/Goals.md" # restore one
Give your agent a live copy with Syncthing
Git is the backup. To get the notes onto an agent’s server, use Syncthing instead of a second Git clone.
- What it is: free, open-source software that syncs folders directly between your devices over your home network. Nothing passes through a cloud service, and there’s no account to create.
- Why not clone the repo on the server? A clone only updates when a timer pulls it, so the agent works from notes up to 15 minutes old, and the server needs a GitHub key. Syncthing delivers each change within seconds and needs no key at all.
- Share only
Wiki, as Receive Only. On the agent’s side, a Receive Only folder takes updates but never sends changes back, so the agent can’t alter your notes even by accident. Folders you don’t share never reach the server. - Keep Git and Syncthing apart. Run Git only on your PC, and never let Syncthing sync a
.gitfolder. Two tools writing the same repo will corrupt it.
The setup is in guide 2.
Skipping GitHub entirely? Syncthing on its own can also be your backup, copying the vault to a NAS or home server so your notes never leave your network. What you give up is the full change history; turn on Syncthing’s File Versioning to keep older copies. Git gives you line-by-line history and an off-site copy; Syncthing keeps everything on hardware you own. Many people use both.
What not to put in your second brain
Your wiki is copied to GitHub, read by AI agents and, in pieces, sent to the model providers those agents use. That makes it the wrong place for anything that would cause real harm if it leaked, and a poor place for files that aren’t text. Keep a short, useful reference in the wiki and link to where the real thing lives.
What to leave out
Secrets and sensitive records
| Don’t include | Examples | Where it belongs | What the wiki keeps instead |
|---|---|---|---|
| Passwords and login secrets | Passwords, PINs, security answers, 2FA recovery codes | A password manager (Bitwarden, 1Password, KeePassXC) | Which account exists and that its login is in the password manager |
| API keys, tokens and private keys | OpenRouter or GitHub tokens, SSH private keys, bot tokens | A password manager, and the server’s .env files | Which service a key is for and where it’s stored, never the key itself |
| Full financial account numbers | Bank, brokerage and routing numbers, full card numbers | Your bank’s app; a password manager’s secure notes | The institution, account type and last four digits (“Visa ending 1234”) |
| Government ID numbers | Social Security, passport and driver’s license numbers | A password manager’s secure notes, or a safe for the physical documents | That the document exists, its expiration date, and where it’s kept |
| Original documents and scans | Tax returns, deeds, contracts, insurance policies, pay stubs | An encrypted folder on your NAS or a cloud drive | A short summary of what matters and a pointer to the file |
| Detailed medical records | Lab results, diagnoses, visit notes | Your provider’s patient portal | Only what you’d want an assistant to know, such as your doctors and appointments, or nothing at all |
| Other people’s private details | A family member’s ID numbers, health or financial information | With that person | Names, relationships, birthdays and preferences they’d be comfortable sharing |
Files and data that belong somewhere else
| Don’t include | Examples | Where it belongs | What the wiki keeps instead |
|---|---|---|---|
| Large media and binary files | Photos, videos, installers, disk images, backups | Your NAS, photo library or cloud storage | A note describing what’s stored and where |
| Live, fast-changing data | Account balances, stock prices, inbox contents | The source app | A dated snapshot when it’s useful (“As of 2026-10-01”) |
| Raw data dumps and logs | CSV exports, server logs, chat or email archives | A data folder, spreadsheet or the original app | A summary of what the data shows |
| Code projects | Scripts, apps, configuration repos | Their own Git repos | What each project is and a link to its repo |
| Your employer’s confidential information | Internal documents, customer data, proprietary code | Your employer’s systems, under their policies | Your own career notes: roles, accomplishments, skills |
| An agent’s working files | Drafts, task notes, logs from scheduled jobs | The agent’s own workspace repo | Nothing. Agent work stays out of your notes until you choose to copy something in |
The rule of thumb
Rule of thumb: if a detail would cause harm in the wrong hands, or isn’t plain text, it doesn’t go in the wiki. Write a note that says what it is and where it lives, and keep the thing itself somewhere built to protect or store it. Even the safe references (last four digits, where a document is kept) belong in one note that others link to, not copied across many.
If a detail would cause harm in the wrong hands, it doesn’t go in the wiki. Write down where it lives instead.
Who gets to change what
Two kinds of agents, two levels of access. Both start by reading the instructions file from step 3.
- Claude: read and write. Claude edits the wiki while you’re at the keyboard: building notes, keeping the index and links current, reorganizing. You review its changes as it goes, and Git keeps every version if you need to undo one.
- Unattended agents (Hermes): read-only. The server gets a Receive Only Syncthing copy of
Wiki, updated within seconds of each edit. Hermes can use everything in the wiki, but nothing it changes is ever sent back to your notes. When it thinks a note needs changing, it writes a proposal for you to apply. That setup is in guide 2. - A separate workspace for the agent. The unattended agent gets its own repo for its working files, outside the wiki. Your notes stay clean, and the agent has a place it’s allowed to write. That’s covered in guide 3.
This is the principle of least access: each agent gets only what its job needs. An agent that runs while you’re asleep, reading web pages and email, has no business editing your notes.
Keeping it useful
- Move finished or cancelled trips and projects to
_Archive, and leave the archive out of everyday searches. - Date any note that holds figures that change (balances, bills), and update the date when the numbers do.
- Keep
Index.mdand the “Where things live” table current whenever a note or folder is added. - Leave empty placeholder bullets (
-) for sections you plan to fill. The instructions file tells agents to leave them alone. - When you change how the wiki works, update
CLAUDE.mdtoo, so agents follow the same rules you do.
RAG FAQ
What is RAG in simple terms?
RAG (retrieval-augmented generation) means an AI looks something up before it answers. Instead of relying only on what it learned in training, it finds the relevant notes or documents, adds them to your question, and writes its answer from them.
Can I use RAG with Obsidian?
Yes. An Obsidian vault is just a folder of Markdown files, which AI agents can read directly. Give the agent an instructions file and an index that tell it where things live, and it looks up the right notes before it answers, with no plugins or vector database required.
Is a personal wiki a form of RAG?
On its own, a wiki is just the knowledge. It becomes RAG when an AI retrieves notes from it to answer a question. The index and the Where things live table are what make that retrieval fast and accurate.
What’s next
You now have a brain: plain notes you own, an index and an instructions file that point your AI at the right place, and a private repo that keeps every version. It’s already useful with nothing more than Claude and Obsidian.
Guide 2, Hermes Agent Install Guide, puts an always-on agent to work on it: a small home server, cheap cloud models, and a read-only copy of these notes so it can run jobs while you’re away.
FORGE YOUR OWN STACK //
- Next up: Read guide 2, the Hermes Agent Install Guide.
- Missed the why? Read Why Build Your Own AI Assistant.
- Stuck on a step? Send me a message. I’d love to hear how you’re organizing yours.
