Operate a durable knowledge vault
Capture, distill, and synthesize raw inputs into governed, citable markdown you own — no cloud, no lock-in.
See how it works →Personal intelligence OS for a founder-operator. The governed memory layer for AI agents.
Local-first, citable, auditable. The model is swappable — the harness is the product.
You can outsource your thinking. You can’t outsource your understanding.
# the compounding loop
raw sources → markdown wiki
markdown wiki → schemas
schemas → skills
skills → evals
evals → governed agent operations
# useful answers file back into the wiki
answers ↺ markdown wiki
Capture, distill, and synthesize raw inputs into governed, citable markdown you own — no cloud, no lock-in.
See how it works →Ingest, query, brief, and evaluate over a markdown vault — schema-governed, eval-checked, public/private-bounded.
Read the agent guide → See the showcase →Start here
memexlab-mcp is a small MCP server that gives Claude Code, Claude Desktop, or
Cursor governed, citable, local memory over any folder of markdown. One command. No account,
no cloud, no index to maintain — the vault stays on your disk.
# point Claude Code at any folder of markdown
claude mcp add memexlab -- uvx memexlab-mcp --vault ~/vault
# until the first PyPI release lands, install straight from git
claude mcp add memexlab -- uvx --from \
"git+https://github.com/btekmen/memexlab-engine#subdirectory=memexlab-mcp" \
memexlab-mcp --vault ~/vault
search_vaultDeterministic, citable retrieval. Every hit comes back as a [[slug]] you can open and verify yourself — no embeddings, no opaque ranking.
read_noteReads a note verbatim off disk. Nothing is summarised, compressed, or silently rewritten on the way to the model.
capture_noteNew notes land only in inbox/, with provenance frontmatter, and every write is appended to a JSONL audit log.
The boundary The canonical layer cannot be modified by the agent. Memory it can use; memory it cannot corrupt.
The problem
Strategic knowledge work needs memory that can be inspected, cited, corrected, evaluated, and compounded. Most systems on offer are none of those things:
“Strategic knowledge work needs memory that can be inspected, cited, corrected, evaluated, and compounded.”
What it is
MemexLab is not a dumping ground, an Obsidian theme, or a vector database demo. It is a harnessed memory operating system: a compounding knowledge system an agent can read, cite, evaluate, govern, and operate.
It applies harness engineering to memory — reliability comes from the scaffolding around the model (context, tools, verification, observability, governance), not the prompt. The model is swappable; the harness is the product.
Ingested text is preserved verbatim as the reproducibility anchor. Nothing rewrites the record.
The canonical layer is atomic, linked markdown — portable plain text you own, with no lock-in.
Every transformation is a named, reviewable operation — not an opaque end-to-end guess.
Frontmatter schemas make briefs, memos, and notes structured and validatable.
Rule-based lint and evaluation checks catch broken links, missing provenance, and drift.
Read, write, share, and promote are explicit actions — bounded by a public/private vault boundary.
The product
The Mark 1 Operating Core is the locked product: Graph + Evidence + Belief + Action + Governance.
The vault layer — your markdown wiki, linked and citable.
Field-state tracking — not tracked | tracked but unavailable | available but needs owner approval | definition unresolved.
Every claim carries a probability. Every belief has evidence.
Decision ledger, approval workflow, and postmortem capture.
Six-grade firewall, agent write boundaries, and audit logs.
Philosophy
Non-negotiable. Every design decision in Mark 1 is downstream of these.
Nothing is captured without an owner and a place in the graph.
A document, a transcript, or a live metric — or it is not a claim.
Confidence is written down, so it can be revised instead of forgotten.
Conversations change state. If nothing moved, it was not a meeting.
Scoped access, explicit approval, an audit trail behind every write.
Briefs that do not change what you do are noise with better formatting.
How it works
Capture → Classify → Link → Pressure-test → Act → Learn. No deploy.
Action ingest raw sources — books, essays, conversations, observations.
Output immutable sources with provenance.
Action extract claims, tag evidence state, assign belief probabilities.
Output structured markdown with metadata.
Action connect related nodes, surface contradictions, build maps.
Output a graph the agent can traverse.
Action run counter-thesis, check citations, validate schemas.
Output quality report and flagged contradictions.
Action produce briefs, decisions, and recommendations with approval workflow.
Output decision records and action items.
Action file outcomes back into the graph; update belief probabilities.
Output memory that compounds instead of being re-derived.
The stack
The Mark 1 Operating Core is built on nine layers — from identity to output surfaces.
Quartet SOUL.md, USER.md, MEMORY.md, tekmen_memex
Markdown wiki with atomic, linked notes
Field-state: not tracked | tracked but unavailable | available but needs owner approval | definition unresolved
Probabilistic claims with confidence scores
Decision ledger, risk assessment, postmortem capture
Seven agents: Archivist, Analyst, Skeptic, Decision, Relationship, Strategic Watch, Chief-of-Staff
Local private · zero usage cost — the default path
Frontier hard tasks only, opt in per task — Claude / GPT / Gemini / Z.ai / DeepSeek / Qwen
Private side ── only the prompt crosses ── public side
Six grades personal private · company private internal · investor-ready · regulator-safe · public content · group-chat safe
Surfaces dashboard · mobile capture · documents · email dispatch · apps / API
Artifacts briefs, memos, decision records, disclosure packages
Sovereignty
No cloud dependencies for the vault. Runs on your machine, your disk, your rules.
Plain text you can read, grep, version, and own forever — no proprietary format.
The harness is the product. Switch models with one environment variable.
GDPR-compatible by design. The vault never leaves your machine unless you publish it.
Technology / model
Mark 1 runs on your machine. Frontier models are optional and opted into per task — they never see the vault, only the prompt you send them.
Apple Silicon · macOS 14+ · 8 GB+ · works offline.
Plain markdown vault · local index · knowledge graph · no account · no telemetry.
Fully on-device · zero usage cost · private by default.
Claude · GPT · Gemini. Bring your own key, opt in per task — only the prompt is sent.
Local for private work, frontier for hard problems. Models are swappable; memory is not.
The MemexLab Engine — inspectable, extensible, MIT-licensed.
Firewall · public/private isolation · privacy by architecture · GDPR-compatible by design.
Roadmap
Not shipped The following compilers, modes, and meters are being developed and validated. They are not yet available in the current release.
Agent Runtime
The Mark 1 Operating Core runs seven specialized agents, each with a clear mandate.
Schema enforcement and link hygiene — keeps the graph valid and traversable.
Synthesis and brief generation — assembles positions from the graph.
Counter-thesis and contradiction detection — pressure-tests every claim.
Decision ledger, risk assessment, and postmortem capture — keeps the record.
Network activation and relationship mapping — who knows what, who needs to know.
Watches the world — market signals, competitor moves, regulatory shifts.
Agenda setting, decision coordination, and action tracking — the orchestrator.
The engine underneath
Mark 1 is the product. MemexLab Engine is the open-source core it runs on — MIT, local-first, nothing to sign up for. There is no black box here: every module below is a directory in one public repository, and you can delete any of them and still own your vault.
memexlab-mcpAn MCP server that hands Claude Code, Claude Desktop, or Cursor governed, citable memory over a local markdown folder.
Ships search_vault · read_note · capture_note, inbox-only writes, JSONL audit log.
Try it claude mcp add memexlab -- uvx memexlab-mcp --vault ~/vault
memex-cliThe memex command line — built ingest-spine first. Captures a public page into inbox/ as readable markdown with provenance.
Ships memex ingest url — dry-run by default, idempotent, no model involved.
Try it uvx --from "git+…#subdirectory=memex-cli" memex --help
runner/A self-hosted reference agent: a minimal local loop that operates a vault through the skills, with a provider-agnostic backend.
Ships local model or hosted API behind one env var; path-escape-guarded vault access.
Try it python3 runner/agent.py --dry-run --vault examples/fake-vault — no key needed.
skills/Eight Agent Skills — the named, reviewable operations an agent performs over the vault. No opaque end-to-end guessing.
Ships memex-ingest · memex-extract · memex-markdown · memex-query · memex-brief · memex-evaluate · memex-frameworks · memex-progress.
Why every transformation has a name, an input, an output, and a review surface.
frameworks/A library of mental-model lenses the agent can apply deliberately, instead of defaulting to whatever the model feels like.
Ships first-principles · inversion · second-order effects · base rates · incentives, plus the five-problem latticework.
Why pressure-testing is a procedure, not a personality trait.
schemas/The frontmatter contract. entity.schema.json defines what counts as a valid note before anything downstream trusts it.
Ships a JSON Schema you can validate any vault against.
Why structure that is enforced beats structure that is merely encouraged.
evals/Quality is measured, not asserted. A sample query set and a written rubric let you regression-test retrieval and synthesis.
Ships query-set.sample.yml · rubric.md.
Why you can tell whether a change to the harness made answers better or worse.
templates/Note templates that keep the vault consistent across years of capture, so the graph stays traversable.
Ships item · source · state.
Why consistency is what makes a decade-old note still legible to an agent.
governance.ymlThe write and publish policy in one readable file: what an agent may touch, and where the public/private boundary sits.
Ships declarative write scopes and the promotion rules for the public vault.
Why governance you can diff in a pull request beats governance in a settings panel.
examples/A synthetic vault to run everything against safely, and a complete worked pass over real public sources.
Ships fake-vault/ · worked-example/ (ingest → extract → frameworks → progress).
Why you can evaluate the system before pointing it at anything of your own.
library/A growing collection of distilled knowledge assets the pipeline itself produced — papers, reports, and books.
Ships the corpus plus build_library_index.py, which rebuilds the index from disk.
Why the output of the system, published — so you can judge it on the work, not the pitch.
scripts/The deterministic tooling around the vault: validation, readiness checks, benchmarks, and non-web ingest.
Ships validate_vault.py · readiness_check.py · run_benchmark.py · ingest_ics.py · ingest_transcript.py · build_llms_txt.py.
Try it python3 scripts/validate_vault.py examples/fake-vault
docs/The full documentation set, versioned next to the code it describes — fifteen chapters plus the engineering reference.
Ships overview · architecture · core concepts · daily workflow · metadata rules · user modes · maintenance · FAQ, plus harness, observability, governance, taxonomy, benchmarks, roadmap and lineage.
Try it mkdocs serve, or read it at btekmen.github.io/memexlab-engine.
Interop The skills follow the Agent Skills spec, so they install alongside kepano/obsidian-skills: those handle the file layer, MemexLab handles the knowledge layer.
MemexLab skills
A skill is a named operation the agent performs over the vault. Each reads from immutable sources and the markdown wiki, writes a schema-shaped artifact, and leaves a reviewable trail. Skill availability and maturity vary in this preview — see the preview status.
Promotes captured material into immutable raw sources with citation metadata.
Artifact a raw source note with provenance fields.
Why every downstream claim can be traced to where it came from.
Cuts a long source into candidate atomic notes — one claim or concept each.
Artifact proposed atomic markdown notes for review.
Why atomicity makes knowledge re-linkable without cascading rewrites.
Builds a reading order or concept map across a topic from existing notes.
Artifact a structured index linking related notes.
Why surfaces the shape of a domain and the gaps still open in it.
Assembles a position on a topic from the canonical layer, with citations.
Artifact a brief that links back to its source notes.
Why a position developed over months is not re-derived from scratch.
Captures a decision, its rationale, alternatives, and the open loops it leaves.
Artifact a durable decision record in the vault.
Why decisions become inspectable history, not lost context.
Answers a question by retrieving over the wiki and citing the notes used.
Artifact a cited Q&A note, fileable back into memory.
Why answers are auditable and compound instead of evaporating.
Logs a market or domain observation as a dated, linkable note.
Artifact an observation note tied to relevant entities.
Why weak signals accumulate into a durable, searchable record.
Enforces what may be read, written, shared, or promoted across the vault boundary.
Artifact governed promotion and publishing actions.
Why private material is not leaked into shareable output by accident.
Attaches and checks source links and cited-slug references on every artifact.
Artifact provenance fields the agent and human can verify.
Why citable memory is the difference between knowledge and a guess.
Runs rule-based checks for schema conformance, broken links, and missing provenance.
Artifact a validation report; failures block the run.
Why quality is enforced by the system, not by good intentions.
The OpenClaw layer
OpenClaw provides the agent runtime and assistant surface. MemexLab provides the durable memory and knowledge operating layer: a markdown-native vault an agent can read, cite, evaluate, govern, and improve.
Preview OpenClaw skill packaging is experimental in this release. The integration is described here at the product level; concrete packaging and runtime bindings are being validated and may change before a stable release.
Architecture
Information flows top-to-bottom: raw sources stay immutable, skills read from sources and the vault, schemas define what counts as a valid artifact, evaluators check quality, and governance controls access and promotion. The agent runtime operates over all of it — and answers can be filed back into the vault.
Markdown Vault
Mark 1 describes nine product layers, from identity to output surfaces. The infrastructure underneath is where the industry builds an eight-layer stack — capture, canonical store, processing, indexes, knowledge, experience, agent surface, governance — and every layer needs their server. MemexLab answers all eight, collapsed onto three primitives you can read, grep, and version. No layer needs a cloud.
Same completeness, radically less machinery — see the honest comparison.
Use cases
Turn books and essays into a linked, citable body of knowledge that compounds.
Synthesize observations and sources into positions you can defend and revisit.
Keep decisions, rationale, and open loops in one inspectable, governed place.
Answer hard questions over your own corpus, with citations, not a generic model.
Bring structure to ambiguous strategic questions with evidence and provenance.
A vault that improves over a decade instead of being re-derived each year.
Move from private notes to shareable artifacts through a governed boundary.
Design-partner program
4–6 weeks, on your machines, zero data out. Free — we run at most two pilots at a time.
Run it yourself
MemexLab ships a small, runnable reference agent. It treats a markdown vault as its workspace, loads the skills as capabilities, and reasons with either a local model or a hosted API — switchable with one environment variable. It runs on your own machine and pairs with Obsidian as the editor.
# load skills + vault — no key, no model
python3 runner/agent.py --dry-run --vault examples/fake-vault
# pick a backend: local (air-gapped) or hosted
export MEMEX_PROVIDER=local # or: anthropic | openai
# operate the workspace
python3 runner/agent.py --task "Summarize each note under people/" --vault ~/vault
One env var (MEMEX_PROVIDER) flips between a local model (Ollama, vLLM, LM Studio) and a hosted API (Anthropic, OpenAI). Same code path.
The agent reads and writes only inside the vault you point it at — path-escape guarded, plain markdown on disk.
Open the same folder in Obsidian; drive the agent from a terminal. No sync layer in between.
The runner is a minimal, runtime-agnostic loop; OpenClaw remains the full agent surface for the same skills and vault. Browse the distilled library of knowledge assets (papers, reports, books) the pipeline produces.
Open-source showcase
The Showcase is a community gallery of real-world MemexLab developments and best cases from around the world. Browse the patterns others have built, then submit yours via a GitHub issue or pull request — no backend, no gatekeeping.
Candid scope
This is a harnessed memory operating system for agents that need durable, inspectable, governed knowledge — with a human as the final reviewer.
Intellectual lineage
This project stands on ideas others developed and shared. It is not affiliated with, endorsed, or sponsored by any of the people or projects below unless otherwise stated — they are inspirations and references.
The foundational pattern: raw sources remain immutable, an LLM incrementally maintains a persistent markdown wiki, and useful answers are filed back into the wiki so knowledge compounds instead of being re-derived from scratch.
Karpathy connects the pattern back to Bush's 1945 vision of the Memex: a private, actively curated knowledge store organized around associative trails between documents — closer to this project than to what the web became. The missing maintenance layer is what the LLM now supplies.
Thanks to Garry Tan for developing and sharing GStack and GBrain, which are major references for the agent-workflow and brain-layer aspects of this project.
Thanks to Peter Steinberger for creating and open-sourcing OpenClaw, the agent runtime this project pairs with by default. OpenClaw gives the agent hands; MemexLab gives it a governed long-term mind.
Thanks to Steph Ango for Obsidian and the “File over app” philosophy this project's plain-markdown ethos follows, and for obsidian-skills — the MIT Agent Skills library the engine pairs with for the vault and file layer.
Status
This is an early harness preview. It is not production-stable. The release is focused on validating the foundations: