Skip to main content

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:

  1. Interface (server.py, cli.py) — MCP server and CLI. Thin dispatch layer; no business logic.
  2. Ops (src/memex/ops/) — Orchestrates each operation (ingest, query, search, lint, …). Coordinates LLM, extractors, search, and VCS; never touches the filesystem directly.
  3. 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 output
    • extractors/ — Pluggable readers for PDF, Markdown, HTML, and URLs
    • search/ — 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memexc-0.1.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memexc-0.1.0-py3-none-any.whl (170.3 kB view details)

Uploaded Python 3

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

Hashes for memexc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d35761d98528e17402422be246a03a70407a90d41c5615616b9ac738649510c
MD5 e20ca606d9896ce7be147de2787a2970
BLAKE2b-256 c1d75a55f064fd129bb8a0e5866b252b0e9e0f6c4b02192c1aab0dec5e15f268

See more details on using hashes here.

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

Hashes for memexc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b78dd0b70983b36f84534fed0297032f5e208a52b1f2d75b78e812f3be7f5b40
MD5 68238068e2e1a2d5fcc9eb4f8e77b2b6
BLAKE2b-256 2f8e8105b42a9a3284f9f376f54162c93dc019b34b1e2013343d9c8c11979a0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page