← Selected work

Dona: a local-first agentic personal assistant

Abstract

Dona answers from personal data: Google Drive documents, calendars, and a business bank account. The architecture is local-first: documents, retrieval, embeddings and vision stay on the machine through Ollama; only sensitive requests go through a dedicated branch backed by open-weights models hosted in Europe, where every write requires explicit human confirmation. Answer citations are validated by code, not by the model.

01The problem

A useful assistant has to know your documents, your calendars, your finances. Cloud assistants require sending all of that to a third party. Dona explores another path: keep as much as possible on the machine, and grant each request only the level of capability, and exposure, it actually requires.

The second problem is reliability: an assistant that makes things up is not an assistant. Every claim Dona makes must be traceable to its source, and every sensitive action must be approved before it runs.

02The architecture: one router, three branches

Every question is first routed by a small model that answers in one word. Three branches: light conversation (local model, no tools), the local agent (documents and calendars, through Ollama), and the critical agent (banking, on open-weights models hosted in Europe). When in doubt, the router picks the critical branch; if the router fails, everything falls back to the local branch, so the degraded mode still works offline.

question routeur 1 mot - doute = critique sur la machine (Ollama) conversation sans outils agent local documents + agendas (MCP) retrieval hybride BM25 francais + dense, RRF Chroma - ingestion incrementale heberge UE (RGPD) agent critique bancaire - Qonto MCP confirmation humaine avant ecriture reponse en streaming citations validees par le code, sources depuis les artifacts encadre bleu = appel LLM - zones en pointilles = ou tournent les modeles
Fig. 1 - The router sends each question to the least-exposed branch able to answer it.

03Ingestion and retrieval

Drive documents are transcribed to Markdown, PDFs page by page by a local vision model, then split along their headings and indexed in Chroma. Ingestion is incremental: only modified files are reprocessed, and old chunks are deleted only after the new ones are built.

Retrieval combines dense search (local embeddings) and lexical search (BM25 with French tokenization: accents, stopwords, stemming), fused through Reciprocal Rank Fusion. The agent can submit several rephrasings of the same question, each question-method pair producing its own ranking before fusion. The whole layer is deterministic: no LLM in the search path.

04The tools

05Guardrails, in code

The guiding principle: never ask the model for what the code can guarantee. Citations in an answer only become sources when their marker exactly matches an excerpt actually returned by retrieval; invented markers are dropped. Tool failures are detected by code and surfaced to the user, the model never narrates its own failures. Text returned by tools is treated as data: any instructions found inside are ignored. And the models' internal reasoning is never sent to the browser.

06The stack

LayerChoice
Local inferenceOllama: local agent, embeddings, vision for transcription
Critical branchopen-weights models hosted in Europe (GDPR)
AgentLangChain / LangGraph: router, three branches, middlewares
IndexChroma + French BM25, RRF fusion
ToolsMCP: Google Calendar (2 accounts), Qonto (OAuth)
InterfaceFlask, NDJSON streaming
Quality101 tests on hand-written fakes, no network and no LLM; interactive documentation

07Status

Dona is open source and actively developed. The repository ships interactive documentation: a system map with drill-down to file level, and step-by-step simulations of ingestion, retrieval and answering.

@software{dona,
  author = {Vinceslas, Medhy},
  title  = {Dona: local-first agentic personal assistant},
  url    = {https://github.com/Mdhvince/Dona},
  note   = {Open source, Myelink}
}
View the code on GitHub Get in touch