Behind the Scenes
Frugal AI, Harness Engineering, and system architecture behind Dori.
When engineers look under the hood of Dori, they find an application built with strict systems discipline: Frugal AI, Harness Engineering, zero native binary dependencies, offline-first execution, and graph-engineered AI workflows.
Dori was built from day one refusing to treat personal memory or AI interaction as an ephemeral, wasteful cloud service.
Key Technical Benchmark & Design Highlights
| Architectural Layer | Implementation Detail | Systems Benefit |
|---|---|---|
| Token-Conscious Engine | Frugal AI & Harness Engineering pipeline wrapping pre-LLM, in-flight, and post-LLM turns. | Zero-token bypass for anything resolvable locally, plus cache reads at roughly a tenth of base input cost under Anthropic’s published prompt-caching economics. |
| Engine Runtime | Replaced better-sqlite3 native bindings with Node 24 built-in node:sqlite. |
Zero native C++ binary dependencies. Engine packages as pure JS across all OS targets without cross-compilation builds. |
| Memory & Boot Latency | Tauri v2’s native Rust shell replaces a bundled-Chromium desktop host, and the engine daemon runs as a lightweight Node process rather than a second Electron/Node stack. | Meaningfully lower idle memory and cold-boot latency than an Electron-based equivalent, without a bundled browser runtime to boot first. |
| Token Economy | Markdown indexing, OCR, Whisper audio transcription, and hybrid search run at 0 API token cost. | Sub-millisecond search without spending LLM tokens on parsing or formatting. |
| State Consistency | Single-writer SQLite WAL (Write-Ahead Logging) mode with explicit BEGIN/COMMIT/ROLLBACK boundaries. |
Crash-safe atomic mutations even during unexpected lid closes or process restarts. |
Technical Deep Dives
- The Token-Conscious Engine: Frugal AI philosophy, Pre-LLM, In-Flight, and Post-LLM Harness Engineering.
- Graph Engineering: DAG topologies, zero-token edge contracts, fan-out/fan-in barriers, and cyclic verifiers.
- Alternatives Considered & Refused: Retrospectives on why we refused LanceDB, Cloudflare Workers, Electron, and
better-sqlite3. - Automated Triage & Confidence Thresholds: Confidence thresholds, severity states, and pattern absorption.
- Offline-First & Zero-Native Engine: Node 24 native SQLite, Tauri IPC,
./doriCLI, and vault synchronization. - LLM Cost & Context Optimization: Prompt caching, context pruning, model tiering (
fastvsreasoning), and schema contracts. - Storage, Indexing & Hybrid Search: Content-addressable SHA-256 fingerprinting, SQLite FTS5 BM25, and local vector embeddings.
