Knowledge & Memory

Obsidian Vault

A self-maintaining knowledge graph where three AI agents, three MCP servers, six databases, and 128 plugins converge to form a living second brain.

Obsidian MCP Server DataviewJS SQLite Python AI Agents

In Plain English

Imagine a notebook app that organizes itself. Obsidian is a note-taking program where all your files stay on your own computer. A "vault" is just its word for your collection of notes. You write notes, and AI automatically links related ideas together, suggests tags, finds notes you forgot about, and writes daily summaries. A guardian agent (a program that watches over things and acts on its own) monitors vault health around the clock, fixing broken connections and finding orphaned thoughts. A writer agent handles journal entries, therapy prep, and dream logs in your own voice.

Problem

An Obsidian vault, at its core, is a folder of markdown files. That simplicity is its greatest strength and its most dangerous weakness. Early on, the vault works beautifully: you create notes, link them together with wikilinks, and the graph view shows a satisfying web of connected ideas. But as the vault grows past a few hundred notes, entropy sets in. Links break when notes get renamed. Orphan documents accumulate in forgotten corners. Tags drift into inconsistency as you use "psychology" in one note and "psych" in another. The graph view becomes a hairball of disconnected clusters rather than a coherent map of knowledge.

The standard advice is to "spend time maintaining your vault," but manual maintenance does not scale. With thousands of notes spanning daily journals, psychology reflections, shadow work entries, dream logs, therapy prep, project documentation, book notes, and person profiles, the vault had grown beyond what a single person could curate by hand. Notes from coding sessions contained valuable insights that were never linked to the relevant project pages. Shadow work entries mentioned patterns that connected to entries written months earlier, but those connections only existed in the author's memory, not in the graph.

The solution was to stop treating the vault as a passive container and start treating it as a living system with its own immune system. The Guardian agent scans for structural problems and prioritizes fixes using weighted scoring. The Writer agent creates new content in the author's authentic voice, handling sensitive psychological material with the nuance it requires. The Obsidian agent manages the technical layer: DataviewJS dashboards, CSS snippets, QuickAdd macros, and 140+ Templater scripts. Three MCP servers expose vault operations to AI assistants. Six SQLite databases power semantic search, entity resolution, and analytics behind the scenes. The vault does not just store knowledge; it actively enriches, connects, and maintains it.

Architecture

The Obsidian Knowledge Ecosystem AI AGENTS (Director-Routed) Guardian Agent Weighted scoring: hub importance, recency, substance, core-area multiplier Orphan detection, link repair, health scores Writer Agent 4 specialists: Distiller, Librarian, Skeptic, Voice Editor Shadow work, dreams, therapy, IFS parts work Obsidian Agent DataviewJS (no ?. or ??), CSS snippets, QuickAdd macros, Templater scripts Infrastructure, not content. Memory-aware. Director auto-routes: @guardian @writer @obsidian based on request signals Agents hand off to each other as needed Obsidian Vault Personal knowledge graph (thousands of notes) 00_System / 01_Daily / 02_Personal / 03_Projects / 04_Resources 128 plugins 54 CSS snippets 140+ templates Daily Notes Shadow Work Dream Logs Psychology Mood Tracking Habit Streaks Therapy Prep People MCP TOOL SERVERS obsidian-advanced 25 AI tools: auto-backlinks, tags, graphs, orphans, similarity, summaries obsidian-vault MCP (v2) 12 tools: search, daily notes, mood, streaks, shadow entries, scripts vault-manager MCP Ollama-powered note routing + classify MEMORY SYSTEM recall MCP (35 tools) + Memory Watcher Templates 140+ Templater scripts Daily, shadow, dream, book QuickAdd Macros Alt+S shadow, Alt+M mood Alt+D diary, Alt+N inbox DATA LAYER (6 SQLite Databases) embeddings.db 768-dim vectors (nomic) FAISS semantic search analytics.db Entity index, usage Recall correlations brain.db Local Brain knowledge store Vector memory + file index entity_resolver.db sources.db temporal.db Canonical names Multi-source correlation Timeline events AUTOMATION & SCHEDULING Memory Watcher Real-time session extraction Coding sessions to vault notes Watchdog (5m) Task Scheduler DB Maintenance VACUUM, ANALYZE scans + fixes creates notes 25 AI tools 35 recall tools async writes The vault is the convergence point: agents maintain it, MCP tools extend it, databases power it, and scheduled tasks keep it healthy. Direct connection Scheduled / async
Scroll to explore diagram

The Obsidian Vault sits at the center of a knowledge ecosystem. Three specialized AI agents maintain and create content, three MCP servers expose 37+ tools to AI assistants, and six SQLite databases provide semantic search, entity resolution, and analytics.

Features

37+ AI-Powered Vault Tools

3 MCP servers

The obsidian-advanced MCP server provides 25 tools for auto-backlinking, tag suggestion, knowledge graph generation, similarity analysis, orphan detection, and summary generation. The obsidian-vault MCP (a custom Node.js server using the Model Context Protocol SDK) adds 12 specialized tools: vault_search for content queries, vault_create_daily for generating daily notes with tracked frontmatter (mood, energy, anxiety, sleep hours), vault_get_streaks for checking habit completion chains, vault_mood_report for trend analysis over configurable time windows, and vault_create_shadow_entry for generating structured psychological exploration notes. The vault-manager MCP uses a locally-running Ollama model for intelligent note routing and content classification, determining which folder, tags, and links a new note should receive based on its content.

Autonomous Guardian Agent

Weighted scoring system

The Guardian agent operates as the vault's immune system. It performs full graph analysis, identifying orphan notes (no backlinks), dead ends (backlinks but no outgoing links), overloaded hubs (30+ connections that need splitting), and isolated clusters (under 20% external links). What sets it apart from a simple linter is the weighted scoring algorithm. Every issue gets a base weight (broken links score 6-8, ChatGPT artifacts score 15, missing frontmatter scores 10), then gets multiplied by hub importance (1 + backlinks/20), recency (favoring recently modified notes), substance (longer notes score higher), and core-area multipliers (Psychology and System notes get 1.3-1.5x priority). This ensures the agent always fixes the most impactful issues first, not just the most recent ones.

Writer Agent with Four Specialists

Authentic voice preservation

The Writer agent handles the vault's most sensitive content: shadow work entries, dream logs, therapy preparation, book notes, and person profiles. It operates through four internal specialists. The Distiller extracts and summarizes raw input into atomic notes. The Librarian structures content with correct tags, wikilinks, frontmatter, and file paths. The Skeptic flags unsupported claims and emotional reasoning gaps. The Voice Editor ensures everything reads in the author's authentic voice, using IFS-informed parts work terminology, Jungian concepts, and custom callout types (anger, grief, fear, shame, win) with emotion-coded color spans. The agent classifies input instantly and executes without asking permission, reporting what was created and where.

Scheduled Maintenance and Self-Healing

Watchdog every 5 minutes

A Windows Task Scheduler watchdog runs every 5 minutes to ensure the Memory Watcher process stays alive, checking its heartbeat and restarting it if stuck. Scheduled maintenance routines run SQLite optimization passes (VACUUM to reclaim space, ANALYZE to update query planner statistics), clean orphaned embeddings that no longer correspond to existing notes, deduplicate entities through canonical name resolution in entity_resolver.db, and remove stale analytics records. The Memory Watcher itself runs continuously, extracting structured knowledge from Claude Code and Gemini CLI sessions in real-time and converting them into vault notes with validated wikilinks, creating topic pages, entity pages, error encyclopedias, and decision logs with bidirectional backlinks.

How It Works

01

Content Enters the Vault

Notes arrive through multiple channels, each optimized for its context. QuickAdd macros provide single-keystroke capture: Alt+S opens a shadow work template, Alt+M prompts for a mood check-in with numeric scales, Alt+D starts a fast diary entry, Alt+N sends a thought to the inbox. Over 140 Templater scripts generate structured notes for daily journals, dream logs, therapy sessions, book notes, and project templates, each with the correct frontmatter schema, folder path, and initial wikilinks. The Writer agent creates psychology content directly when triggered by shadow work prompts or journal entries. The Memory Watcher extracts knowledge from AI coding sessions in real-time, turning them into structured vault notes automatically.

02

AI Tools Enrich and Connect

Once a note exists, the MCP tool servers go to work enriching it. The obsidian-advanced server's auto-backlinking tool scans the vault for notes that reference similar concepts and weaves bidirectional wikilinks between them. Tag suggestion analyzes the note's content and proposes tags from the existing taxonomy, preventing the drift that happens when you tag manually from memory. Knowledge graph generation maps concept relationships into visual structures. Similarity analysis uses embedding vectors from nomic-embed-text to surface notes the author forgot about, the ones written six months ago that are directly relevant to today's reflection. The vault-manager's Ollama model classifies new content and routes it to the correct folder with generated frontmatter.

03

Guardian Monitors Vault Health

The Guardian agent performs full vault scans using a Python-based scanner that builds an in-memory graph of all notes and their link relationships. It produces a weighted issue list where each problem is scored by base severity multiplied by contextual factors. A broken link in a hub note with 25 backlinks that was edited yesterday scores dramatically higher than a missing tag on a stale note from two years ago. The Guardian delegates work to other agents when appropriate: content creation goes to the Writer, DataviewJS dashboard fixes go to the Obsidian agent. Every transformation it performs generates training data that will eventually enable a local LLM to run maintenance passes autonomously through Ollama.

04

Six Databases Power the Backend

The data layer consists of six SQLite databases, each serving a distinct purpose. embeddings.db stores 768-dimensional vectors from the nomic-embed-text model, indexed by FAISS for sub-second semantic search across the entire vault. analytics.db tracks entity indices, usage events, and recall correlations, enabling the memory system to know which notes are most frequently accessed and how they relate to each other. entity_resolver.db prevents duplicate entities through canonical name resolution, so "Carl Jung," "Jung," and "C.G. Jung" all point to the same entity. sources.db handles multi-source correlation. temporal.db maintains a timeline of events. brain.db stores the Local Brain's knowledge graph, providing an additional vector search layer accessible through the local-brain MCP server.

05

Scheduled Tasks Keep Everything Alive

The system runs continuously without manual intervention through several interlocking automation layers. The Windows Task Scheduler watchdog checks the Memory Watcher's heartbeat every 5 minutes and restarts it if the process has stalled or crashed. Database maintenance routines run VACUUM and ANALYZE on all six SQLite databases, clean orphaned embeddings for notes that have been deleted or moved, deduplicate entity records, and validate referential integrity across the data layer. The vault writer component generates Obsidian-formatted notes from every coding session, complete with validated wikilinks that point to real notes in the graph. The result is a knowledge system that grows richer and better-connected over time, not through manual effort, but through automated processes that run around the clock.

Vault Structure

00_System

The control center of the vault. Contains CLAUDE_BRAIN.md, a living document that gives every AI agent a quick snapshot of the vault's current state, structure, and conventions. Also houses SESSION_LOG.md for tracking AI interactions, the Guardian scanner scripts, training data collectors for the local LLM, and agent configuration files. This folder is the vault's self-awareness layer, enabling AI tools to understand what they are working with before making changes.

01_Daily

Daily notes with structured frontmatter tracking mood, energy, anxiety, sleep hours, and water intake on numeric scales. DataviewJS dashboards aggregate these metrics into trend visualizations, showing week-over-week patterns. Habit streaks are tracked across Meditation, Exercise, Reading, and Water by scanning checkbox completion in daily notes. The vault_get_streaks MCP tool counts consecutive days of completion by walking backward through the date-named files.

02_Personal

Psychology notes, shadow work entries with structured trigger-reaction-investigation-integration sections, dream logs with symbolic interpretation, therapy preparation documents, and person profiles. Custom callout blocks use emotion-coded colors: pink (#fd79a8) for emotions, purple (#a55eea) for insights, green (#2ed573) for growth, orange (#ffa502) for warnings. Hub notes like "Shadow Work and Self" and "Carl Jung" anchor the graph, providing densely-linked reference points that connect dozens of related entries.

03-04 Projects & Resources

Project documentation spanning every system in this portfolio, gaming configurations for Don't Starve Together servers, finance tracking, and email intelligence. The Resources folder houses the 140+ templates organized by type (daily, shadow, dream, book, project, person), along with book notes, reference materials, and archived content. Each project folder mirrors the actual codebase structure, with notes that link to related vault entries about the technologies, decisions, and patterns involved.

Tech Stack

Core

Obsidian (128 plugins)

MCP Servers

Node.js + Python (3 vault servers)

AI

Ollama (hermes3, nomic-embed-text)

Databases

6 SQLite DBs + FAISS vectors

Theming

54 CSS snippets + Style Settings

Scheduling

Windows Task Scheduler + watchdog