Lekto reads every document.
And shows why.
A self-hosted, headless document management system. Text recognition, a language model and a final judgement file each document for you, and every value it sets must stand in the text. You see the evidence, not a guess.
docker compose up -dFrom scan to filed, with every step on record.
Several signals propose, the judgement decides. Each step is logged with its duration and result and can be repeated, so you can always trace why a document landed where it did.
Read
Upload, mail or API. Lekto splits stacks at separator sheets and recognises the text as a searchable PDF/A.
Recognise
Signals propose a contact, a type and more: a language model, a classifier and similar documents.
Decide
The judgement weighs the proposals. A value counts only if it stands in the text.
File
Rules add tags or set the title, then Lekto files the document in its space.
Lane
Every run ends in one of three lanes, so you only look at what needs you.
Everything stands in the text and fits. Lekto files the document, and it shows up as new in the inbox.
A value has no source in the text, or Lekto proposes a new contact. You confirm or correct it.
A step failed or nothing was recognised. Lekto says what is missing and waits for you.
Built for a household archive that runs itself.
For home and small offices. Your documents, your server, your choice of model: local with Ollama or any OpenAI-compatible endpoint.
Facts and identifiers
A customer number or a domain tells Lekto who sent a document. IBANs, meter and contract numbers stay as facts of the document. Documents relate to each other, and recurring ones form series, so Lekto knows when the next one is due.
IMAP mailboxes with rules each. Attachments become documents, the mail's text becomes a PDF beside them.
Search words and meaning
Hybrid full-text and vector search in one query, always within your rights. Save views as lenses.
Rules you can test
Global or per space, built from conditions and actions. Titles come from Liquid templates, and a dry run shows what a rule would change on existing documents before you apply it.
People and spaces
Native logins with TOTP or OpenID Connect. Rights belong to spaces, never to single documents.
Headless, with an MCP server
The REST API is the only way in. The web UI is one client, Claude and other AI clients are another, with the rights of the signed-in user. Signed webhooks and server-sent events for everything else.
A quiet interface for paperwork.
SvelteKit web UI in German and English, with its own design system. Works on the phone as well as on the desktop. All names and numbers in the pictures are made up.
Hexagonal core, everything else is an adapter.
- HeadlessREST API with OpenAPI. Web UI, MCP server and the Paperless migration are its clients.
- HexagonalA plain Python core with ports. FastAPI, SQLAlchemy and each service sit behind adapters with contract tests.
- AsynchronousThe API answers at once, a worker processes. A transactional outbox feeds UI, webhooks and the index.
- StorageSQLite or Postgres, file system or S3, Meilisearch. Originals never change and are addressed by SHA-256.
- ModelsAny OpenAI-compatible endpoint: a language model, embeddings and optionally a vision model.
- Made with ClaudeThe architecture, the ideas and every feature come from the author, as do parts of the code. Claude writes code too and, above all, reviews it.
A different approach to the same paper.
Lekto grew out of eight years with Paperless-ngx, and it doesn't compete with it. Paperless-ngx is a mature DMS that does its job well. Lekto takes another route: every document goes through a language model, and every decision can be traced back to the text.
Lekto suits you if
- you want correct filing without sorting by hand.
- you want to see why each value was set.
- you run a language model anyway, local or cloud.
- you want to ask your archive from Claude.
Paperless-ngx suits you better if
- you mainly want to archive, not classify.
- you don't want to pay for a language model.
- you prefer a mature project with a big community.
- you need a stable release today.
Both are for households and small offices. Lekto has no audit log, no revision-safe storage and no multi-tenancy, and it won't get them.
Why Lekto was built (German) →Lekto's words for things.
A few words in the app are Lekto’s own. Here is what they mean, and what other tools often call the same thing.
- Lens elsewhere: saved view
- A personal, saved look at the documents, with its filters, sort and layout.
- Space elsewhere: workspace
- Where documents live and rights are given. Every user has a personal space, shared spaces have members.
- Beam elsewhere: quick look
- A sheet from the side that shows a document's pages without leaving the page. Every document title opens it.
- Stream elsewhere: timeline
- A layout that shows documents along time, month by month, such as everything from one contact.
- Signal elsewhere: suggestion source
- One source that proposes values for a document. The language model, the classifier, similar documents and the facts of the text.
- Judgement elsewhere: decision
- The step that weighs what the signals propose and sets contact, type, tags and date. A value counts only if it stands in the text.
- Lane elsewhere: status
- Where a run ends. Done (green), Review (yellow) or Action needed (red).
- Fact elsewhere: extracted data
- Anything Lekto reads in one document, such as a name, a number or a date. Each fact points to its place in the text.
Open source, in the open.
Everything lives under github.com/lektohq. Issues and pull requests are welcome.
Running in three commands.
Docker Compose with the published image. Open port 8000 and sign in as admin.
- Point
LEKTO_LLM_BASE_URLat Ollama or any OpenAI-compatible endpoint. - Coming from Paperless-ngx? The migration suite moves 9,000 documents in about three hours.
- More setups: Postgres, S3, more workers, Caddy, Traefik, nginx.
Beta. Breaking changes can come with any release. Read the release notes before updating and keep a backup.
$ cd docker $ cp .env.example .env # now fill in the secrets in .env $ docker compose up -d ✔ Container lekto-meilisearch Started ✔ Container lekto-api Started ✔ Container lekto-worker Started $ open http://localhost:8000



