# Marginalia

A local-first personal research agent that organizes messy private document collections into a library with metadata, then reads the relevant original file sections before writing a cited answer instead of relying only on vector search over chunks.

Marginalia ingests text, Markdown, PDFs, DOCX, images, spreadsheets, logs and archives, organizing them with folders, catalogs, tags, views, metadata and journals, and mining relations between files. When answering a question it recalls candidates with lexical search by default, with optional embeddings, sqlite-vec and reranking, then reads the original sections, pages, lines, archive members or table slices before writing an answer, producing cited responses and durable investigation notes that later turns can recall.

It ships as a desktop app for Windows, macOS and Linux with a bundled Python runtime, or can be run from the command line; the default mirror storage backend keeps a user's library as readable files under a configured home directory. Desktop bundles also include CLI wrappers, an MCP server, and a worker process that share the same data directory as the desktop app.

Website: https://github.com/shenmintao/marginalia
