Most of this costs
nothing to run.

The naive way to build something like this would ask a language model to reason about every routing decision, every search, every "where does this go?" question. Dori Mini is built the other way around — the model gets called only where judgment genuinely can't be avoided.

No separate bill, either. This isn't a hosted product with its own metering — it's scripts your existing coding agent runs. If you already pay for Claude Code, Codex, or similar, that subscription is the only cost. There's nothing additional to sign up for.

The naive version vs. this one

The expensive default

Every capture, every search, every "which folder does this belong in" gets sent to the model to reason about from scratch — including re-reading large chunks of your vault just to answer a simple recall question.

What this does instead

Deterministic code handles routing and search first. The model is reserved for the handful of things that actually need judgment — summarizing, disambiguating, extracting minutes.

The stack, layer by layer

What each piece is, and whether it ever touches a model at all.

§

SQLite + FTS5 full-text index

Every vault file gets indexed into a local node:sqlite database with an FTS5 virtual table (porter-stemmed) the moment it's written. An exact or near-exact recall question — "what did we decide about the pricing page" — is answered by a plain SQL query against this index.

zero model cost
§

Local embedding model

When a question is paraphrased rather than exact-match ("that thing about the annual discount"), a small embedding model (Xenova/all-MiniLM-L6-v2, via Transformers.js) runs on your machine to generate a vector and compare it against the vault. No API key, no network call.

zero model cost
§

Hybrid search with reciprocal rank fusion

Rather than asking a model to re-rank candidate results, FTS and vector search results are merged with RRF (k=60) — a well-known, deterministic formula for combining two ranked lists into one. This is the "re-ranking" step, and it's arithmetic, not an inference call.

zero model cost
§

Deterministic routing scripts

"Is this an expense message?", "which category — food, transport, lodging?", "does this document belong to an existing project?" — all of these are plain code (keyword lists, folder-matching logic) mirroring Dori's own real routing rules, not a model guessing from scratch on every message.

zero model cost
§

Two-tier model use for long transcripts

A meeting transcript over roughly 1,500 tokens is compressed first by a small, fast model — cutting filler while keeping every decision, number, and action item verbatim — and only then handed to the larger model for actual extraction. You pay the expensive model to reason, not to read filler.

cheap model, only past the length threshold
§

No server, no hosted backend

Every piece above runs as a script your agent invokes directly on your machine. There's no backend metering requests, no usage dashboard to check — the only spend that exists is whatever your agent subscription already covers.

zero additional infrastructure

A capture, traced end to end

What actually happens, step by step, when you ask a recall question.

"What did we decide with the design team?"— nothing yet
query-vault.mjs runs a keyword search against the FTS5 indexfree
a strong match is found — Decisions Log + Action Items returnedfree
the model reads the ~200-word result and answers in plain languagemain model, ~200 words

If the FTS search had come up empty, the next step would be local semantic search — still free — before ever falling back to a broader question to the model. The model only sees the small, already-relevant result, never the whole vault.

The open source it's built on

Nothing above is a proprietary black box — every piece is a widely-used, inspectable project. Check the source yourself.

§

Node.js — node:sqlite & node:crypto

The FTS5 index and local database run on Node's own built-in SQLite module — no separate database server, no extra dependency to install for this part.

github.com/nodejs/node →
§

Transformers.js (@huggingface/transformers)

Hugging Face's JavaScript port of Transformers — runs the local embedding model entirely on your machine, no API key or network call needed at query time.

github.com/huggingface/transformers.js →
§

Xenova/all-MiniLM-L6-v2

The actual embedding model weights — a small, well-known sentence-embedding model, loaded once and cached locally by Transformers.js.

huggingface.co/Xenova/all-MiniLM-L6-v2 →
§

yt-dlp

Pulls YouTube captions and the uploader's own chapter markers — the same tool millions of people already use for downloading video/audio.

github.com/yt-dlp/yt-dlp →
§

markitdown

Microsoft's open-source converter — turns PDF, DOCX, PPTX, and XLSX files into clean Markdown locally, before anything is read or filed. It reads embedded text directly — a scanned, image-only PDF won't extract text this way (there's no OCR step, no Tesseract dependency). A photographed receipt or bill is instead read directly by the multimodal model itself, which is why that path costs a small amount of model tokens rather than being free.

github.com/microsoft/markitdown →

Want actual numbers instead of the theory above? See real measured token/context counts →

The promise, restated

No new subscription

Piggybacks entirely on the coding agent you already pay for. There's no Dori Mini bill.

No hidden API spend

Search, routing, and indexing run locally with zero API calls — the only tokens spent are the ones you'd expect for genuine reasoning.

Inspectable, not a black box

Every script here is plain, short, and readable — you can see exactly what ran and why.