What is an AI second brain?
An AI second brain is a folder of notes that AI agents read before they work and write back to after, so each session starts where the last one ended.
Updated
An AI second brain is a set of notes, usually plain Markdown files in an app like Obsidian, that an AI agent reads before it works and writes back to when it’s done. It gives a model that starts every session from zero a memory you can open, read and correct: your projects, decisions, sources and preferences.
“Second brain AI”, “Claude second brain” and “Obsidian second brain” with Claude Code all point at the same setup. Some people use the phrase for a searchable vector database instead; the table below shows how the two differ.
As of November 2026, from the sources that shaped the term: Tiago Forte’s Building a Second Brain, Andrej Karpathy’s LLM Wiki gist, Anthropic’s page on how Claude remembers your project, and the open-source obsidian-second-brain kit. The meaning is still settling, so those sources win if this page disagrees.
An agent that writes to your notes stops to ask before it does, and the prompt waits in a terminal you aren’t looking at. Coral puts every waiting agent in your Mac’s notch, so you answer with one key. Download Coral for free
Where the term came from
The second brain, before AI. Tiago Forte made the phrase popular with his book Building a Second Brain and the method around it. His site describes it as “a way to cultivate a growing body of knowledge that is uniquely your own”, built with four steps he calls CODE: capture, organize, distill and express (buildingasecondbrain.com). In that version a person does all four. The notes app only stores the result.
April 2026: the model does the filing. Andrej Karpathy’s LLM Wiki gist, created on April 4, 2026, moved the work. Most people’s experience with LLMs and documents, he wrote, is retrieval: the model finds chunks at question time and “is rediscovering knowledge from scratch on every question. There’s no accumulation.” His alternative: the model “incrementally builds and maintains a persistent wiki — a structured, interlinked collection of markdown files that sits between you and the raw sources.” And the division of labor: “The human’s job is to curate sources, direct the analysis, ask good questions, and think about what it all means. The LLM’s job is everything else.”
He also described the desk setup many people now copy: “Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase.”
Since then: kits. Open-source projects package the pattern for coding agents. One of the most used, obsidian-second-brain (MIT, about 5,400 GitHub stars in November 2026), calls itself persistent memory for Claude Code, Codex and other agents, “stored as plain markdown in your Obsidian vault”, and ships commands to save, ingest and reconcile notes plus agents that run on a schedule.
What it looks like in practice
Karpathy’s gist names three layers, and most setups have the same parts under different names:
| Part | What it is | Who writes it |
|---|---|---|
| Raw sources | Articles, transcripts, PDFs, meeting notes you chose to keep | You collect them; the agent reads them |
| The notes | Markdown pages the agent keeps current: one per project, person, concept or decision, linked to each other | The agent, with you reading along |
| The schema | One instructions file, such as CLAUDE.md for Claude Code or AGENTS.md for Codex, that says how the notes are laid out and what to do when adding to them | You and the agent together |
| An index and a log | index.md lists every page with a one-line summary; log.md is an append-only record of what happened and when | The agent |
The schema file is what makes it work with a coding agent. Per Anthropic’s docs, “each Claude Code session begins with a fresh context window”, and of CLAUDE.md files it says “Claude reads them at the start of every session” (memory). Put the vault’s rules there and every session starts knowing where things go. Anthropic suggests keeping each CLAUDE.md under 200 lines; it can pull in other files with @path imports.
The gist lists three things you then do with it: ingest a new source into the notes, query the notes with a question, and lint, a periodic health check of the notes themselves.
Claude Code has a small built-in version of the same idea. With auto memory on, it keeps its own notes about your corrections and preferences in ~/.claude/projects/<project>/memory/, and loads the first 200 lines or 25KB of the MEMORY.md index at the start of a session (memory). A second brain is that, turned into something you own: in your folder, in your structure, readable in Obsidian, shared by every agent you use.
AI second brain vs LLM wiki, RAG and CLAUDE.md
| Term | What it names | Where the knowledge lives | Who keeps it current |
|---|---|---|---|
| AI second brain | Your notes as working memory for AI agents, across projects | Markdown files you own, often an Obsidian vault | The agent writes, you read and correct |
| LLM wiki | Karpathy’s specific pattern: raw sources, a wiki the model compiles from them, and a schema file | A folder with raw/ sources and wiki pages | The model; you choose the sources |
| RAG knowledge base | Documents split into chunks and stored as embeddings, searched by meaning at question time. This is how MindStudio defines an AI second brain | A vector database | A pipeline; nothing is rewritten |
CLAUDE.md / AGENTS.md | The instructions file an agent loads every session | One short file per project or user | You, mostly |
| Auto memory | Notes Claude Code writes for itself | ~/.claude/projects/<project>/memory/ | Claude |
| Context engineering | Choosing what goes into the model’s context window at each step | Not a store; a practice | You and the harness |
In short: RAG finds passages, an LLM wiki rewrites sources into pages, and a second brain is the wider habit of letting agents keep your working notes. The instructions file is the door they all come in through.
A worked example: ours
We run one. It’s an Obsidian vault in a git repo, and a headless Claude Code run uses it every morning to look after a handful of websites.
vault/
├── CLAUDE.md what each folder is for, and the rules for notes
├── Projects/ one note per project
│ └── <project>.md Decisions · Next · Log
├── Research/ one note per research run: summary and links only
├── Templates/ every note starts from one, so properties match
└── Daily/
Each project note has three sections the agent owns:
- Decisions: one line per call it made, with the numbers behind it and a date to check whether it worked.
- Next: its own backlog, kept to five lines.
- Log: one line per day, newest first, linking to the full report.
What happens each morning:
- Cold start. The run begins with nothing but its instructions file, which tells it to read each project’s Decisions and Next before it changes anything.
- Work. It does the day’s checks. A decision recorded last week (“this query belongs to that page”) is followed, not re-argued.
- Write back. It adds today’s decisions, refreshes Next, adds one Log line and commits the vault.
- Correct. We can overrule it by editing a line. The next run reads the edit like any other note.
Two rules do most of the work. Notes hold decisions, numbers and links, never copies of reports or code, so the vault stays small enough to read. And the run may only edit the folders it has been given: it starts with --permission-mode dontAsk and an allow list, so anything else is refused, not asked, and the refusal goes in its report.
Agents that keep your notes also stop to ask before they write. Coral shows every waiting agent in your Mac’s notch, with what it wants to change. Get Coral for free
Where it stops
Reading notes is the easy half. The value comes from the agent writing back, and that’s where the pattern is still unsolved:
- Every write is a decision. In Claude Code’s Manual mode each file edit asks first, and that approval ends with the session (permission prompts). Ten notes updated means ten prompts, or a rule you wrote to skip them.
- Nobody is there at night. A scheduled agent can’t ask anyone. The obsidian-second-brain kit says so directly: its background agent runs with
--dangerously-skip-permissionsbecause no one is present to approve each write, which is why it ships switched off, limited to file tools, with no MCP servers (README). The other route is an allow list: indontAskmode only pre-approved tools run and the rest is denied. Is --dangerously-skip-permissions safe? covers what the flag still blocks. - Mistakes compound. A wrong line in the notes is read as fact by every later session. That’s what the gist’s lint step is for, and why a git history and notes short enough to reread matter more than clever retrieval.
- It’s your private writing. A vault holds things you’d never paste into a chat. An agent with shell access in that folder can read all of it, so scope what it can reach.
Where Coral fits
Coral isn’t a notes app and it doesn’t build the vault. It handles the first gap above, for agents you run at your Mac:
- Writes that wait. When Claude Code, Codex, the Copilot CLI, OpenCode or Grok stops to ask before editing a note or running a command, it appears in your Mac’s notch, the one that has waited longest first.
- See what it wants to change. The card shows what the agent wrote just before asking and every option. Answer with 1, 2 or 3; ⌘Z takes it back within two seconds.
- Several sessions. One agent ingesting sources into the vault while another works in a repo is the normal case. Both show in the same list.
- Away from your Mac. Alerts reach your iPhone on the free plan; answering from the phone is Pro.
It doesn’t help a headless run at 3 a.m.: nothing waits there, because nothing can be asked. That run needs the allow list.
If the scheduled side is what you’re building, see software factory and background agents. The free CLAUDE.md builder writes the schema file.
Questions
What is a second brain in AI?
A set of notes that an AI agent reads before working and updates afterwards, so knowledge carries from one session to the next. The older meaning, from Tiago Forte’s Building a Second Brain, is a personal notes system a person maintains by hand. The AI version hands the filing and cross-linking to the model.
How do I make a Claude second brain with Claude Code?
Create a folder of Markdown notes (an Obsidian vault works), add a CLAUDE.md at its root that says how notes are organized and what to update after each task, and start Claude Code in that folder. Claude reads CLAUDE.md at the start of every session. Kits like obsidian-second-brain add ready-made commands on top.
Do I need Obsidian?
No. The notes are plain Markdown files, and any editor can read them. Obsidian is popular because it shows links between notes and a graph view, and because it works on a local folder the agent can also open.
Do I need an Obsidian MCP server?
Not for a coding agent. Claude Code or Codex started in the vault’s folder reads and edits the Markdown files directly. An MCP server is for tools that can’t open the folder themselves; the obsidian-second-brain kit includes one.
How is an AI second brain different from RAG?
RAG leaves your documents as they are and retrieves matching chunks when you ask a question. A second brain in the LLM wiki style has the model rewrite sources into linked pages that it keeps current, so later sessions read a synthesis, not fragments. Many setups use both.
What is Karpathy’s LLM wiki?
A pattern Andrej Karpathy published as a GitHub gist on April 4, 2026: raw sources you curate, a wiki of Markdown pages the model builds from them, and a schema file such as CLAUDE.md that tells the model how to maintain it, with three operations: ingest, query and lint.
Is it safe to let an agent write to my notes?
Safer with three habits: keep the vault in git so every change can be undone, limit which folders the agent may edit, and review what it wrote. Running it unattended with --dangerously-skip-permissions removes the last check, so keep that to an agent limited to file tools in a folder you can restore.