Sovereign Knowledge Bases presentation
Knowledge architecture · RAG · Agents
Build a sovereign AI-powered knowledge base
How a personal Obsidian vault became production RAG with PostgreSQL, MCP agents, and offline continuity — and how I guide others to do the same without surrendering their notes to the model.
The opportunity
Own the vault. Teach the agents. Keep Git as truth.
Most “AI knowledge bases” quietly invert the stack: the LLM becomes the store. A sovereign design keeps your markdown, your repo, your boundaries — and layers retrieval and agents on top.
Queryable
Hybrid + vector search over your own notes — not a chat memory dump.
Durable
Postgres + incremental indexing so knowledge survives sessions and outages.
Agent-operable
MCP tools with security boundaries — agents work the vault on purpose.
Offline-capable
Snapshot tiers when the live API is dark — continuity without cloud lock-in.
Section 01 · The knowledge base
PARA vault. Git as system of record.
kbase_professional is a PARA-structured Obsidian knowledge base: projects, areas, resources, archive —
YAML frontmatter, path-qualified wikilinks, and CI (check_vault.py) as the quality gate.
Markdown in Git
Obsidian is the editing surface. The repo — not chat history — is what lasts.
kbase_dev monorepo
- obsidian-rag / obsidian-rag-postgres
- obsidian-mcp-server
- obsidian-devops-copilot
Section 02 · From notes to RAG
Semantic RAG, hardened to production.
Born in an AI literacy build cycle, then shipped as Obsidian RAG v2.0 — vault stays local; only query context and truncated matches reach the LLM.
- Embeddings
- sentence-transformers/all-MiniLM-L6-v2 (384-dim), cached locally
- Hybrid search
- Tags (TF-IDF) + semantic similarity — Auto / Hybrid / Tags / Semantic modes
- Generation
- Claude via Anthropic API on retrieved snippets
- Web enhance
- Optional Brave Search, merged with vault hits (vault preferred)
- Interfaces
- FastAPI (:8000), CLI (
ask), web UI, cost tracking
Homelab · Obsidian RAG Postgres
pgvector replaced pickle caches.
PostgreSQL 16 + pgvector on the Teleport stack — structured filters, full-text ranking, and vector similarity in one durable store.
notes
One row per file; frontmatter columns + JSONB; weighted tsvector (title / type / content).
chunks
Heading-aware segments with embedding vectors for precise retrieval.
graph
Normalized tags, note_tags, and resolved wikilink edges in note_links.
vault-indexer
Full + incremental indexing via content hashes — unchanged files skipped.
Compose phases
Schema → indexer → RAG API wired to the DB — shipable in layers.
Homelab reach
Production path on the self-hosted stack — your hardware, your boundaries.
Continuity
When the API goes dark, work continues.
Snapshot export (POST /export-snapshot) writes a portable index into
.copilot/rag-snapshot/ for the DevOps Copilot plugin.
Live server
Full hybrid + vector retrieval against Postgres.
Snapshot
Portable index when the live API is unreachable.
Vault-native
Fallback to local vault search — still operable offline.
Section 03 · AI / MCP / agents
Agents don’t scrape the vault blindly.
obsidian-mcp-server — FastMCP tools in a distroless Docker image: non-root, path traversal guards, extension allowlists. Cursor and other hosts load trackers, search notes, and write only under contract.
Tool surface
- get_file_contents · simple_search
- create_file · periodic notes
- HTML deliverable planner
Governed write
- Git remains system of record
- Cloud / Slack agents stage to 0-inbox/
- Desktop promotes into PARA
Operating model
A deliberate tool stack — not vibes.
- Cursor
- Daily frontier-model coding + MCP (user-obsidian)
- Write contract
- Git = SoR; inbox staging for cloud agents; human-led PARA promotion
- AGENTS.md
- Session-start: read monorepo + project trackers via MCP
- DevOps Copilot
- Obsidian plugin — multi-tier RAG (live / snapshot / vault)
- Homelab inference
- Ollama / ai-api-proxy for local models where configured
- Ticket agent
- Separate MCP agent for PDF / ticket workflows in the same vault ecosystem
Section 04 · Architecture
One vault. Two paths to intelligence.
The Obsidian PARA markdown vault in Git feeds two paths. Path one: vault-indexer loads PostgreSQL with pgvector, which powers the homelab RAG API for CLI, web UI, and offline snapshots used by DevOps Copilot. Path two: Obsidian MCP in Docker connects Cursor and other agents for read, search, and governed write.
Obsidian vault (PARA markdown / Git) │ ├─► vault-indexer ──► PostgreSQL + pgvector ──► RAG API (homelab) │ ├─ CLI / Web UI │ └─ snapshot → Copilot offline │ └─► Obsidian MCP (Docker) ──► Cursor / agents read · search · governed write
Typical loop: agent reads the project tracker via MCP → uses RAG or vault search for deep context → proposes or applies changes under write policy → human reviews Git and pushes.
Section 05 · Why it matters
Personal notes become infrastructure.
Queryable · durable · agent-operable · offline-usable — without treating the LLM as the system of record.
I design and guide these stacks — from PARA vault hygiene to RAG, Postgres, MCP, and agent write contracts — so you can build a knowledge base that stays yours.
Bradley Franklin · sovereign knowledge systems · Obsidian · RAG · MCP agents
What I help with
- Vault schema & CI quality gates
- Hybrid RAG + pgvector migration
- MCP hardening & write contracts
- Homelab / offline continuity tiers
What you keep
- Your markdown and Git history
- Clear security boundaries
- Human review before push
- Models as instruments — not owners