Projects/Adaptive Digital Assistant (ADA) — Privacy-First Personal AI System

Adaptive Digital Assistant (ADA) — Privacy-First Personal AI System

A privately hosted personal AI system connecting local LLM inference, source-linked memory, document retrieval, and an encrypted Kotlin Android client. I built explicit review, consent, and recovery boundaries across the stack, with separately recorded host validation and remaining physical-device voice acceptance gates.

AI Systems Engineering2026AI Systems, Backend & Android Engineering
Local LLMsSelf-Hosted AIRetrieval-Augmented GenerationAndroidAI EvaluationPrivacy
On this page

Highlights

  • Built authenticated Python APIs, PostgreSQL persistence, a Kotlin Android client, and read-only web monitoring around a server-hosted local LLM.
  • Implemented scoped memory and document retrieval with exact source spans, trust labels, bounded context assembly, and immutable request replay.
  • Designed encrypted Android journals that record reviewed operations before HTTP and reconcile restored state without silently resubmitting writes.
  • Integrated reviewed speech input, independent playback, and an optional local continuous-speech evaluation build; native wake and extended device acceptance remain open.

Key metrics

Android unit tests
336
Recorded per PersonalVoice / CoreRelease host build; not 672 independent tests or device acceptance.
Web unit tests
72
Private 1.0 preparation: units, lint, types, contracts, and production build passed.
OpenAPI paths
166
1.0 contract check; application version changed while existing paths stayed compatible.
API schemas
220
Same release-preparation contract snapshot as the 166 paths.
Database tables
77
Schema 0022 inventory, including metadata; a structural count, not a performance result.

Media

Technical illustration. Private personal release candidate; no application screen or conversation is depicted.
Source-based architecture diagram. Android reaches authenticated ADA APIs; it does not connect directly to Ollama or PostgreSQL. Optional speech runs locally on Android.

Tech stack

PythonFastAPIOllamaPostgreSQLSQLAlchemyKotlinJetpack ComposeAndroid KeystoreTypeScriptTailscaleCaddy

Project overview

ADA is a personal AI system built around control over data, evidence, and execution. The application combines a server-hosted LLM with persistent memory, document context, Android interaction, and explicit user review. The 1.0 milestone is a private personal release candidate, prepared for the owner's own devices rather than public distribution.

My contribution spans the API and persistence model, source-aware retrieval, client workflows, consent rules, recovery protocols, and evaluation tooling. Ollama supplies model inference, PostgreSQL supplies storage, and Android supplies device services; the engineering work connects those components through explicit contracts.

Motivation and problem

A useful personal assistant needs continuity without silently converting every conversation or generated summary into a trusted fact. It also needs to recover from interrupted requests without duplicating actions or changing the evidence behind an earlier answer. I designed ADA around scoped ownership, reviewed memory changes, and traceable context so these behaviors can be inspected.

System architecture

A Kotlin/Jetpack Compose client talks to authenticated FastAPI endpoints over private HTTPS. The backend owns authorization, conversation state, retrieval, request reservation, and local Ollama calls. PostgreSQL stores versioned sources, claims, requests, and receipts. Read-only web monitoring exposes bounded operational metadata.

  • Clients use ADA HTTP contracts; database credentials and the inference provider remain server-side.
  • The documented deployment uses one API worker and shared model admission. Inference runs outside database transactions; short transactions reserve and publish durable results.
  • Tailscale and Caddy provide the private remote connection path. No private network address is needed to explain the architecture.

Self-hosted LLM infrastructure

The Ollama adapter exposes bounded completion and streaming paths, configured context/output limits, model identity, timeouts, and explicit provider failures. Server-side token settings and conservative prompt-byte budgets constrain context before inference. The client receives the canonical saved response rather than treating streamed fragments as completed evidence.

Model and application evaluation are separate concerns. Deterministic fixtures check ownership, exact citations, and recovery; opt-in real-model probes assess behavior under their recorded conditions. Neither a successful API call nor an exact source span establishes that an answer is semantically useful.

Retrieval and persistent memory

Retrieval filters ownership, scope, valid time, source availability, and ambiguity before ranking. Lexical, subject, and entity signals select complete evidence groups within a shared context budget. Claim cards and document cards retain original source versions and exact spans, so a saved answer remains explainable after later edits.

Document context is explicitly selected. Reviewed proposals can create endorsed memory with provenance, while imported documents and model-generated suggestions retain their trust labels. An optional exact-cosine semantic channel exists, with lexical degradation on incompatible or missing entries; it remains disabled by default and has no validated production relevance claim.

Android application

The native app supports chat, memory review, documents, projects/tasks, preferences, and consent controls. Its encrypted session store uses Android Keystore and versioned journals. An operation's exact payload and key are saved before submission; restoration checks receipts with reads before offering an explicit retry.

Journal version 19 retains readers for earlier formats. Same-owner session renewal preserves an active continuous-capture lease while other private reads are fenced until identity is verified. Logout, expiry, revocation, or an identity change stops the relevant private activity.

Reviewed voice interaction

Speech becomes an editable draft. Explicit Send endorses the chosen wording, retaining the original generated transcript as separate provenance. Playback has its own Stop and audio lifecycle; stopping playback does not silently cancel server generation.

Ordinary builds use Android's on-device speech facilities and retain pause-sensitive recognition with the legacy 60-second route. The optional PersonalVoice build adds pinned local streaming recognition and neural playback. Longer narratives retain a separately reviewed excerpt for model context rather than automatically indexing the entire story as memory.

  • Experimental wake service: explicitly armed from a verified visible conversation; a wake cues or opens ADA and does not authorize locked private speech or automatic Send.
  • Accelerated decoder streams and small native wake fixtures are recorded separately from real-time microphone, human locked-wake, battery, accessibility, and route-interruption acceptance.

Privacy, security, and data ownership

Password sessions, revocable credentials, owner/scope checks, source trust, and content epochs protect private operations. Versioned encrypted backups include restoration verification and credential quarantine. Explicit erasure has its own preview, confirmation, and recovery implications; historical copies and backups are accounted for rather than implying instantaneous deletion everywhere.

  • Scheduling requires both the server switch and owner consent, which are off by default. Reviewed reminders enter a durable inbox; an offline laptop cannot dispatch and an offline phone has no timely-notification guarantee.
  • Bounded tools and optional isolated public research have separate authorization contracts. Model output cannot grant itself new permissions or promote untrusted material into endorsed facts.

Reliability and recovery

Request fingerprints, immutable source snapshots, attempt/lease fences, and durable receipts distinguish a retry from a new request. Streaming cancellation and final publication serialize against the same request state. A disconnect means observation was lost, while a completed replay returns its saved result without selecting newer evidence.

Android journals, server receipts, backup formats, API versions, and schema versions evolve independently. PersonalVoice, CoreDebug, and unsigned CoreRelease profiles stage identifiable artifacts with hashes, avoiding an assumption that a changed version label establishes a device-ready build.

Validation and engineering results

The October 24 private 1.0 preparation records 336 Android unit tests for each selected host build profile and 72 web unit tests, with their accompanying lint/build checks. The contract snapshot has 166 paths and 220 schemas; the installed schema inventory is 0022 with 77 tables. These are different kinds of evidence, not an aggregate accuracy score.

An earlier Phase 32 full backend regression records 1,268 passes and 80 skips. Its skips include optional PDF and Ollama probes, and it is not a new full-suite result from the later release-preparation run. Physical-device observations, host builds, deterministic checks, and model probes remain separately attributed.

Current limitations and future development

The private release still needs the remaining installation and physical voice acceptance checks. Native wake reliability, paced long microphone capture, permission/call/audio-route interruptions, accessibility, unplugged resource use, and native bundle redistribution review remain open. The native Release gate stays closed.

On-device text generation failed the documented quality checks and stays disabled; OCR is off. Watch integration and physiological-state inference are outside the supported implementation. The next useful milestone is bounded device acceptance and representative answer/retrieval evaluation before broader distribution.

Related projects

OwnerPilot technical illustration of reviewed documents, hybrid retrieval, verified research, and internal quotes

OwnerPilot — AI-Powered Business and Procurement Intelligence

AI Product Engineering · 2026

Featured

An end-to-end AI application joining SMB operating analytics with reviewed RFQ extraction, hybrid catalog retrieval, and tool-using procurement research. I built durable workflows, source-bound evidence verification, deterministic quote calculations, and human approval controls, then evaluated local-model research on independently frozen fictional procurement cases.

Agentic AIHybrid RetrievalOCRAI Evaluation
Mission-X technical illustration of graph navigation, command supervision, and mecanum wheel interfaces; not a robot photograph

Mission-X CityCar — Autonomous Mobile Robotics Platform

Robotics · 2026

Featured

A ROS 2 mobile robotics platform connecting Gazebo city simulation, graph navigation, mecanum-drive control, sensor feedback, and a React control interface. I implemented reusable command and hardware interfaces, with explicit separation between source-supported simulation workflows and Raspberry Pi functionality that still needs measured physical validation.

RoboticsROS 2Autonomous NavigationMotion Planning
Speed-aware event-based star tracking project cover

Event-Based Star Tracking for Spacecraft Attitude Estimation

Space Autonomy · 2026

Featured

A Speed-Aware EBS-EKF research prototype for event-camera star tracking that improves low-light spacecraft attitude estimation by making centroid correction depend on both brightness and image-plane speed.

Event-Based VisionSpace AutonomyState EstimationStar Tracking
Automated goalie robot project cover

Automated Goalie: Ping Pong Ball Trajectory Prediction System

Robotics · 2025

Featured

A closed-loop robot-learning prototype that detects a ping pong ball, estimates its 3D motion, predicts the landing point, and rotates a servo-driven blocker in real time on a Raspberry Pi-based hardware setup.

Computer VisionTrajectory PredictionEmbedded SystemsReal-Time Robotics
← Back to all projects