PLUR Blog · 2026-07-09

How Do I Use AI Memory to Build a Second Brain?

How Do I Use AI Memory to Build a Second Brain?

The problem is not that you forget things. The problem is that your AI forgets things — and the knowledge you carefully captured in notes, bookmarks, and project files never reaches your agent when it matters. Building a “second brain” with AI memory means giving your agent a persistent, structured store of what you know, so it stops asking you to re-explain context you already documented. The gap between a notes app and an agent that actually uses those notes is where memory systems live.

Why this question exists

“Building a Second Brain” is a methodology popularized by Tiago Forte. The core idea: your biological brain is for having ideas, not storing them. Offload knowledge into an external, centralized, digital repository so you can find anything you have learned, touched, or thought about in the past within seconds (Forte, 2023, “Building a Second Brain: The Definitive Introductory Guide,” fortelabs.com).

Forte’s methodology is called CODE — Capture, Organize, Distill, Express:

  1. Capture only the most important information — ideas worth saving.
  2. Organize it by actionability using the PARA method (Projects, Areas, Resources, Archives).
  3. Distill notes down to their essence so insights resurface.
  4. Express — turn accumulated knowledge into creative output.

This maps to a long academic tradition. Personal knowledge management (PKM) is defined as “a process of collecting information that a person uses to gather, classify, store, search, retrieve and share knowledge in their daily activities” (Wikipedia, “Personal knowledge management,” citing Frand & Hixon, 1999). PKM tools — Obsidian, Notion, Roam Research, Apple Notes — handle steps 1 through 3 well. They are excellent at capture and organization.

What they do not do is step 4 in the AI era: they cannot feed knowledge back to an AI agent automatically. Your Obsidian vault has thousands of notes. Your agent has zero of them. That is the gap AI memory fills.

The three layers of an AI-powered second brain

A second brain built for the AI era has three layers, each with a different job:

LayerWhat it doesExamples
Capture layerWhere you write notes, clip articles, save ideasObsidian, Notion, Apple Notes, Logseq
Memory layerWhat the agent remembers — corrections, preferences, facts, proceduresMem0, Letta, Cognee, Graphiti, PLUR
Interface layerHow the agent accesses memory — the protocol that connects themMCP (Model Context Protocol)

The capture layer is your notes app. The memory layer is the agent’s own store of what it has learned. The interface layer is what lets the agent read from both.

Most people stop at layer 1. They build an elaborate Obsidian vault or Notion workspace and assume their AI assistant can “see” it. It cannot — not without a memory layer and an interface that connects them.

How AI memory extends the CODE methodology

The CODE steps were designed for humans working with notes. AI memory adds a fifth capability: recall — the agent proactively surfacing the right knowledge at the right moment, without you searching for it.

CODE stepHuman-only (PKM)With AI memory
CaptureYou write a noteThe agent captures corrections and preferences automatically
OrganizeYou tag and link notesEngrams are typed (behavioral, procedural, terminological) and scoped by domain
DistillYou summarize and highlightThe agent distills raw conversations into atomic facts (engrams)
ExpressYou write output using your notesThe agent injects relevant memory into context automatically
RecallYou search manuallyThe agent surfaces the right memory at the right time — no search needed

The key insight: in a human-only second brain, recall is manual. You must remember that a note exists, then find it. With AI memory, recall is automatic. The agent decides what is relevant and injects it into context before you ask.

Zhang et al. (2024) identify memory as “the key component” supporting agent self-evolution — the mechanism that lets agents “solve real-world problems that need long-term and complex agent-environment interactions” (arXiv:2404.13501). Without memory, every agent session starts blank. With memory, the agent accumulates knowledge the way your second brain should — persistently, structurally, and with the ability to recall on demand.

What each memory system brings to a second brain

The major open-source agent-memory systems each approach the “second brain” problem differently:

Mem0 — universal memory layer

Mem0 (github.com/mem0ai/mem0, Apache-2.0, ~60,800 stars as of Jul 2026) provides a multi-level memory layer that retains user, session, and agent state. Its April 2026 algorithm update achieved 91.6 on the LoCoMo benchmark and 94.8 on LongMemEval, using single-pass extraction and multi-signal retrieval (semantic + BM25 keyword + entity matching). Mem0 is designed for integration into AI assistants, customer support chatbots, and autonomous systems — it captures memories as structured facts with entity linking, not as raw chat logs.

Letta — stateful agents with memory

Letta (github.com/letta-ai/letta, Apache-2.0, ~23,800 stars as of Jul 2026) takes an agent-centric approach. Originally MemGPT (Packer et al., 2023, arXiv:2310.08560), Letta builds agents with a memory hierarchy inspired by operating systems: core memory blocks the agent manages itself, archival memory for longer-term storage, and context compaction to fit within token limits. The agent actively manages what it remembers and forgets, making it suited for deeply personalized assistants that learn coding conventions, preferences, and project patterns over time.

Cognee — knowledge graph memory

Cognee (github.com/topoteretes/cognee, Apache-2.0, ~27,900 stars as of Jul 2026) builds a self-hosted knowledge graph from ingested data. Rather than storing discrete facts, Cognee combines vector embeddings with graph reasoning — entities, relationships, and ontologies that evolve as your knowledge grows. This makes it particularly suited for connecting a notes corpus to an agent: ingest your notes, and Cognee builds a graph the agent can traverse.

Graphiti — temporal context graphs

Graphiti (github.com/getzep/graphiti, Apache-2.0, ~28,500 stars) extends the knowledge graph approach with temporal awareness. Each fact has a validity window — when it became true and when it was superseded. This matters for a second brain because knowledge is not static: your preferences change, projects end, facts get corrected. Graphiti tracks what was true then and what is true now, and exposes an MCP server so Claude, Cursor, and other MCP clients can query it.

PLUR — open engrams as plain text

PLUR (github.com/plur-ai/plur, Apache-2.0, ~215 stars) takes the most direct approach to the second brain concept: each learned fact is stored as a human-readable YAML entry — an engram with an id, statement, type, domain, scope, confidence, and provenance. Engrams live in a file you can open in any editor, put under version control, and carry between machines. PLUR works across MCP-compatible tools (Claude Code, Hermes, OpenClaw, Cursor), so the same memory store serves every agent you use. In benchmarks, Haiku with PLUR memory outperformed Opus without it at roughly 10× less cost — suggesting the bottleneck is not model intelligence but context.

The MCP layer: how your notes and your agent connect

The Model Context Protocol (MCP, specification version 2025-11-25, modelcontextprotocol.io) is an open protocol — JSON-RPC 2.0 based, inspired by the Language Server Protocol — that standardizes how LLM applications connect to external data sources and tools. It is transport-level: it defines how an agent talks to a memory server, not what format the memories are in.

MCP is what makes the three-layer second brain possible. With MCP:

Graphiti ships an MCP server. Cognee ships an OpenClaw plugin and Claude Code integration. PLUR installs via npx @plur-ai/mcp init and configures Claude Code hooks for automatic engram injection. The pattern is the same across all of them: the memory layer speaks MCP, and the agent speaks MCP back.

How to actually build it

  1. Keep your notes app. Obsidian, Notion, Logseq — whatever you already use for capture. The second brain does not replace your notes; it adds a memory layer on top.
  2. Add a memory engine. Choose one that fits your stack: Mem0 for API-driven integration, Letta for stateful agents, Cognee for knowledge graphs from your notes corpus, PLUR for open plain-text engrams across multiple tools.
  3. Connect via MCP. Install the MCP server for your memory engine and point your agent at it. The agent can now read from both its own memory store and (if the server supports it) your notes.
  4. Let it learn. The memory layer captures corrections, preferences, and facts automatically. You do not need to manually tag or organize what the agent learns — the engine handles typing, scoping, and retrieval.
  5. Review and edit. The second brain principle is that memory should be inspectable and correctable. If the agent learned something wrong, fix it. PLUR stores engrams as YAML you can edit; Cognee lets you inspect the knowledge graph; Mem0 has CRUD APIs for add, update, and delete.

The difference between a notes app and a second brain

A notes app is a place where you write things down. A second brain is a system that remembers things for you — and, in the AI era, for your agent.

The CODE methodology was built for humans. AI memory extends it with automatic capture, typed organization, distilled engrams, and — critically — automatic recall. Your agent surfaces the right knowledge at the right time without you searching for it. That is the difference between a vault of notes you must manually search and a second brain that actively participates in your work.

The tools to build this exist today. They are open source, they speak MCP, and they work with the coding agents and AI assistants you already use.

FAQ

What is a second brain for AI? A second brain for AI is a persistent memory layer that lets your AI agent remember facts, preferences, and corrections across sessions — extending the personal knowledge management concept (popularized by Tiago Forte’s CODE methodology) to agents that can automatically recall and apply what they have learned.

Can I use AI memory with Obsidian? Yes. Cognee can ingest your notes corpus and build a knowledge graph from it. Graphiti provides an MCP server that agents can query. PLUR stores memory as plain-text YAML files alongside your vault. Obsidian’s Smart Connections plugin (github.com/brianpetro/obsidian-smart-connections, ~5,200 stars) also provides semantic search within your vault, though it does not persist agent-learned facts the way a dedicated memory engine does.

What is the CODE method? CODE stands for Capture, Organize, Distill, and Express — a four-step methodology for building a second brain, developed by Tiago Forte (fortelabs.com). AI memory extends CODE with a fifth capability: automatic recall, where the agent surfaces relevant knowledge without you searching for it.

How does MCP connect notes to AI agents? MCP (Model Context Protocol, specification 2025-11-25) is an open protocol that standardizes how LLM applications connect to external data sources. A memory server that speaks MCP can expose your notes or learned facts to any MCP-compatible agent — Claude Code, Cursor, Windsurf, or OpenClaw — regardless of vendor.

Which memory system is best for a personal second brain? It depends on your stack. Mem0 is best for API-driven assistants. Letta is best for deeply personalized stateful agents. Cognee is best for turning a notes corpus into a queryable knowledge graph. PLUR is the option for open, portable, plain-text memory that works across multiple coding agents via MCP.