A knowledge compiler that turns source documents into a living wiki
Project description
memex
Feed it papers. Get a wiki. It compounds.
A knowledge compiler that turns source documents into a living wiki. Sources are input. Claims are the intermediate representation. The wiki is the executable.
Install
pip install -e .
Or with optional extras:
pip install -e ".[dev]" # development tools
pip install -e ".[embeddings]" # sentence-transformers for semantic search
One-shot (no install):
uvx memex
Quick Start
# Initialize a wiki
memex init ./my-wiki
# Ingest a source
memex ingest paper.pdf
# Query the wiki
memex query "What are the key findings?"
What is this?
Memex is a Python MCP server that compiles knowledge from source documents (PDFs, markdown files) into an Obsidian-compatible wiki backed by git. It implements Karpathy's LLM Wiki concept as a real software system.
Like a compiler:
- Sources (PDFs, markdown) → Claims (the IR) → Wiki (the executable)
- Every claim traces to a source
- Every article is derivable from its claims
- Incremental recompilation: only re-synthesize what changed
Architecture
Memex is organized in three layers:
- Interface (
server.py,cli.py) — MCP server and CLI. Thin dispatch layer; no business logic. - Ops (
src/memex/ops/) — Orchestrates each operation (ingest, query, search, lint, …). Coordinates LLM, extractors, search, and VCS; never touches the filesystem directly. - Foundation — Four focused subsystems:
store/— All filesystem I/O for the.memex/directory (claims, manifest, citations)llm/— LiteLLM wrapper with Jinja2 templates and Pydantic structured outputextractors/— Pluggable readers for PDF, Markdown, HTML, and URLssearch/— BM25 claim search;vcs/— Git integration
Upper layers never bypass the store layer. Every claim traces to a source; every article is derivable from its claims.
MCP Configuration
{
"mcpServers": {
"memex": {
"command": "uvx",
"args": ["memex", "--wiki-dir", "./my-wiki"]
}
}
}
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memexc-0.1.0.tar.gz.
File metadata
- Download URL: memexc-0.1.0.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d35761d98528e17402422be246a03a70407a90d41c5615616b9ac738649510c
|
|
| MD5 |
e20ca606d9896ce7be147de2787a2970
|
|
| BLAKE2b-256 |
c1d75a55f064fd129bb8a0e5866b252b0e9e0f6c4b02192c1aab0dec5e15f268
|
File details
Details for the file memexc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: memexc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 170.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b78dd0b70983b36f84534fed0297032f5e208a52b1f2d75b78e812f3be7f5b40
|
|
| MD5 |
68238068e2e1a2d5fcc9eb4f8e77b2b6
|
|
| BLAKE2b-256 |
2f8e8105b42a9a3284f9f376f54162c93dc019b34b1e2013343d9c8c11979a0d
|