AI Second Brain

July 2026 · updated November 2026

A personal knowledge base where I bring the material and an AI agent does the writing. I feed it articles, videos and my own raw thoughts; the agent turns them into wiki pages, links everything together and keeps it all up to date. It started as a wiki and grew into a small system of its own: it runs day and night on an old laptop at home, I drive it from my phone, and agents now work on their own on a schedule.

The idea

Most note-taking systems die the same way: saving things is easy, but keeping them organized, linked and current is tedious, so the notes go stale and nobody reads them again. The work that kills a second brain is exactly the work an AI agent is good at.

So I split the roles. The project follows the LLM Wiki pattern shared by Andrej Karpathy: instead of searching raw documents every time (as classic RAG does), an agent builds and maintains a lasting wiki of Markdown pages, so knowledge adds up instead of being rediscovered.

What I do
  • Choose what is worth keeping
  • Write my thoughts freely, however messy
  • Ask questions
  • Decide the judgment calls
What the agent does
  • Read and summarize every source
  • Write and update all the wiki pages
  • Link related pages in both directions
  • Keep the index and the history log current

Three layers

The vault is a folder of Markdown files with three layers, each with a clear owner:

Raw · mine Sources Articles, transcripts, images and journal entries, exactly as they arrived. Never edited afterwards: they are the source of truth.
→read by the agent
Wiki · the agent's Knowledge Every page written and maintained by the agent, cross-linked with [[wikilinks]].
areas/entities/concepts/sources/notes/index.mdlog.md
Schema · the rules AGENTS.md One file describes how the agent must behave: page templates, frontmatter, linking rules and every workflow. It turns a general-purpose AI into a disciplined librarian.

A map of connected ideas

Because the agent links every page to the pages it relates to, the vault grows into a network rather than a pile of notes. This is its real graph: each dot is a page, each line a link the agent wrote, and the biggest dots are the hubs that many ideas lead back to.

Graph of the knowledge base: about a hundred linked pages, with a few large hubs

The vault's graph in September 2026, about three months in. Page names are hidden to keep its content private. By November it had grown past 220 pages.

How I use it

Ingestadd something new
  1. I drop a link, a note or a picture into the Capture card, or write a thought
  2. We discuss the key takeaways first
  3. The agent writes a summary page
  4. It updates every related page
  5. Index and log updated, then a commit
Queryask a question
  1. The agent starts from the index
  2. It reads the relevant pages
  3. It answers with citations
  4. A good answer is filed back as a new note
Linta regular health check
  1. Contradictions never reconciled
  2. Claims made stale by newer sources
  3. Orphan pages and missing links
  4. Fixes the obvious, asks me about the rest

Always on

The brain lives on an old laptop that stays closed in a corner, running around the clock. I almost never sit in front of it: I reach it from my phone or my other computers through a private network, and a dashboard I built (with the agents) is the control room.

Agent sessions from the phoneStart a Claude Code, Codex or Antigravity session in one tap, read its screen and answer it like a chat. Closing one costs nothing: the next session boots from the rules and the index, so the vault is the memory.
Work while I sleepA message can be scheduled for the night, or for the moment a usage limit resets, and the result is waiting in the morning.
A second opinionA task can move to another agent or model mid-way, or go to a small council of other agents that review it before I decide.
Capture in one placeA card on the home screen takes a thought, a link or a photo and hands it to an agent to file.
The wiki as a 3D cloudEvery page drawn as a point in space, grouped by area, with the links between them and the pages touched in the last two weeks lit up.
Beyond the wikiThe same rules apply when an agent works in my code projects: it ships the code there and writes the decisions back to the brain, so intent and code never drift apart.

Daily routines

Some sessions start on their own, at fixed times, with no one at the keyboard. Each follows a written procedure in the vault, so the result is the same whichever agent runs it.

Lesson of the dayevery morning A short course on one thing I lack to reach my goals, with diagrams, examples, an exercise and a quiz. I rate it, and the next one adapts.
Morning reportafter the night Once my watch and scale have synced, an agent writes a short factual report on sleep, heart rate and training. A weekly summary follows on Sunday.
Goals reviewevery Sunday An agent goes over the week and updates my goals board on three horizons, writing down the reason for every change in priority.
Remindersat the time I asked "Remind me Thursday" in any session becomes a phone message at the right time, listed on the dashboard until I tick it.
Voice briefson demand A plain text brief on any topic, made to upload to a voice assistant and talk it through out loud, then filed back into the wiki.
Health checkeach time I open the dashboard Broken links, forgotten pages and missing details are flagged on the dashboard before they pile up.

Philosophy

Sources never changeWhat came in stays as it came in. Corrections and new understanding live in the wiki, never in the originals.
Changing my mind stays visibleWhen something new contradicts an old page, the agent notes the contradiction instead of silently overwriting. How my thinking evolves is the most valuable part.
Opinions are labelled as opinionsAnything that comes from my own thoughts is marked as my view, with a date, so it never reads like an established fact.
Stay in the loopThe agent discusses each source with me before filing it, rather than quietly rewriting a dozen pages on its own.
Synthesize, don't transcribeShort pages that are correct and current beat long pages that are stale.
Answers are worth keepingA good analysis should not disappear into chat history: it becomes a page and feeds future questions.
No lock-inPlain Markdown and one vendor-neutral rule file: any AI agent can take over tomorrow, and the notes outlive every tool.
Private by designThe vault lives in a private repository, and the dashboard and the wiki site are only reachable on my private network. This page describes the system, never its content.

Tech stack

AI coding agentsClaude Code, Codex or Antigravity. Each reads the same AGENTS.md, through a tiny stub file when it expects another name.
Agent dashboardA small Python web app made for the phone: sessions, capture, goals, lessons and the wiki cloud in one place.
tmux + systemd timersEvery agent session lives in tmux, so it survives a closed browser, and timers start the daily routines.
TailscaleThe private network that lets my phone and computers reach the laptop from anywhere, with nothing open to the internet.
TelegramA private bot that brings reminders and alerts to my phone.
Markdown + YAML frontmatterEvery page has a type, an area, tags, dates and the sources behind its claims.
Git + GitHubHistory of every change, and sync between my machines: pull before working, push after.
QuartzA local website built from the vault, with search, graph and backlinks in the browser.

Inspiration