Skip to content

Shared AI knowledge base with Obsidian vault and vector search

pattern

Multiple AI agents need access to a shared, searchable knowledge base with semantic retrieval

obsidianvector-searchknowledge-baseqmd
47 views

Problem

AI agents lose context across sessions. Memories, decisions, and learned patterns vanish after each conversation. You need a persistent, searchable knowledge base that multiple agents can read from and write to -- one that supports both keyword and semantic search, runs locally, and uses a format both humans and AI can work with.

Solution

Use an Obsidian vault as the storage layer, QMD for local vector search, and a structured folder hierarchy that AI agents can navigate.

1. Set up the vault structure

00-inbox/
├── tweets/           # Twitter threads, posts
├── articles/         # Blog posts, essays
├── monologues/       # Voice memo transcriptions
└── captures/         # Screenshots, misc
01-archive/           # Processed inbox items
02-concepts/
├── ai/               # AI patterns, tools, techniques
├── development/      # Engineering practices
├── leadership/       # Management, culture
└── ways-of-working/  # Workflows, processes
03-people/
├── team/             # Team member profiles
├── network/          # Professional contacts
└── industry/         # People you follow/learn from
04-outputs/
├── daily-updates/    # Daily summaries
├── posts/            # Social media content
└── presentations/    # Decks, talks
05-reference/
├── templates/        # File templates
└── tools/            # Tool documentation

2. Add CLAUDE.md files per directory

<!-- 02-concepts/CLAUDE.md -->
# Concepts Directory

This directory contains structured knowledge organized by domain.
Each file uses YAML frontmatter with: title, tags, created, updated.
Use wikilinks [[like this]] to cross-reference related concepts.
When adding new concepts, check for existing related files first.

3. Install QMD for local semantic search

# QMD by Tobias Lutke - local vector search for markdown
npm install -g qmd

# Index the vault
qmd index /path/to/vault

# Search semantically
qmd search "how to handle rate limiting in claude code"

QMD combines three search methods: BM25 full-text search, vector semantic search via local GGUF models (node-llama-cpp), and LLM re-ranking. All runs locally with no API calls.

4. Connect agents to the vault

<!-- Skill: vault-search.md -->
---
name: vault-search
description: Search the knowledge base for relevant context
---

Use QMD to search the Obsidian vault at ~/vault:

1. Run `qmd search "<query>"` to find relevant notes
2. Read the top 3 results for context
3. If adding new knowledge, create a file in the appropriate directory
4. Use wikilinks to connect to existing notes

Why It Works

Obsidian vaults are just folders of markdown files -- the most AI-friendly format. Every file is grep-able, readable by Claude Code, and editable by both humans and agents. QMD's hybrid search (BM25 + vector + re-ranking) provides high-quality retrieval without any cloud dependency. The folder structure with per-directory CLAUDE.md files means agents can navigate the vault hierarchically or search semantically. Git-backed sync ensures version history and conflict resolution across multiple agents writing simultaneously.

Context

  • Aaron Vanston's vault setup with ClawdBot demonstrates this pattern running in production for daily summaries, email triage, and content creation
  • QMD by Tobias Lutke (Shopify CEO) runs entirely local using GGUF models -- no API keys needed
  • Matthew Blode's claude-code-search tool indexes Claude Code session history for similar retrieval
  • Sync via Git gives you version history, diffs, and merge conflict resolution for multi-agent writes
  • Add a cron job to auto-commit vault changes so agent writes are preserved
  • The vault doubles as a hot-swappable memory layer -- switch AI providers without losing accumulated knowledge
About this share
Contributormblode
Repositorymblode/shares
CreatedFeb 10, 2026
View on GitHub