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.
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.
Deterministic code handles routing and search first. The model is reserved for the handful of things that actually need judgment — summarizing, disambiguating, extracting minutes.
What each piece is, and whether it ever touches a model at all.
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.
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.
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.
"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 costA 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 thresholdEvery 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 infrastructureWhat actually happens, step by step, when you ask a recall question.
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.
Nothing above is a proprietary black box — every piece is a widely-used, inspectable project. Check the source yourself.
node:sqlite & node:cryptoThe 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 →@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 →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 →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 →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 →
Piggybacks entirely on the coding agent you already pay for. There's no Dori Mini bill.
Search, routing, and indexing run locally with zero API calls — the only tokens spent are the ones you'd expect for genuine reasoning.
Every script here is plain, short, and readable — you can see exactly what ran and why.