case study
Personal Health AI: Bloodwork, Sleep, and Nutrition on Your Own Hardware
One person's private AI system that ingests lab results, tracks sleep from a wearable, monitors fasting compliance, plans meals, and manages medications. Everything runs locally. Nothing leaves the building.
data sources
6 (wearable, labs, food, meds, symptoms, calendar)
lab markers tracked
66 per draw
infrastructure
Mac Mini running locally
the problem
The Problem: Health Data That Never Meets Itself
The data existed. An Apple Watch tracked sleep and activity every night. A clinic in Bangkok emailed bloodwork results as PDFs every few months. A food logging app recorded meals. Medications lived in a note on a phone. Symptoms were mentioned to doctors and then forgotten. None of it talked to each other. Each lab draw was a snapshot that disappeared into an email archive. Sleep data lived in the Health app and was never compared against anything. Food logs existed for a week and then lapsed because the feedback loop was too slow to be useful. The information was there, but no single surface could answer a question like "how has my LDL trended over the last year and does it correlate with how I've been eating?" The manual alternative was opening five apps, downloading PDFs, and trying to remember what the doctor said three months ago. It did not survive a busy week.
the build
What Was Built: A Private Health Pipeline on Local Hardware
The system runs on a Mac Mini on a desk in Bangkok. It connects to six data sources: an Apple Watch pushing health metrics over a webhook, a clinic that emails lab results, a food log through messaging, a medication tracker, a symptom journal, and a calendar for appointments and retest scheduling. When a lab result arrives by email, the agent parses the PDF, extracts all 66 markers, canonicalizes the names against a reference table (no LLM involved in the mapping, it is deterministic code), stores them in SQLite, and compares against previous draws. If LDL jumped 15% since the last panel, the agent messages through Telegram with the finding. If everything looks stable, it says so. No dashboard to check. No app to open. Sleep data flows in automatically from the Apple Watch via Health Auto Export. Every morning, the system assembles the previous night's session: total sleep, deep sleep, REM, efficiency, heart rate, SpO2. It compares against weekly trends and personal targets. If deep sleep has been declining for three nights running, that shows up in the morning briefing. Food logging works through conversation. "I had pad kra pao with a fried egg for lunch" sent to the Telegram bot is enough. The agent estimates macros, tags the meal, logs it, and tracks daily totals against nutrition targets. A cron job runs the weekly meal planner based on what's in the fridge and what nutritional gaps exist. Medications, supplements, and doses are tracked with their own schema. When a new blood draw arrives, the agent can show which medications were active at the time of the draw and whether any dosage changes correlate with marker shifts. The entire system is orchestrated by OpenClaw. The plugin system wraps each CLI tool with a typed schema. The cron scheduler runs morning briefings, weekly compliance reports, and retest reminders. The messaging layer delivers everything to Telegram, where asking a follow-up question queries the same database the automated reports use.
daily use
What It Looks Like Day to Day
The morning starts with a message. Sleep summary, fasting status, any flags from overnight data. No prompt required, it just arrives. Throughout the day, interaction is conversational. "What was my vitamin D last draw?" pulls the value, the date, the trend direction, and whether it's in range. "Compare my last two lipid panels" produces a side-by-side with deltas highlighted. "Log 200mg magnesium" records a supplement dose. The agent knows the full context because everything lives in the same database on the same machine. Meal logging is a quick message. The agent handles estimation and categorization. A weekly planner accounts for what food is on hand (the system tracks a fridge and freezer inventory), what nutrition tags haven't been hit recently, and what the current calorie and macro targets are. When a retest is due, the system creates a calendar event and sends a reminder through messaging. When the results come back by email, the cycle continues: parse, store, compare, report. The user never opens a portal, downloads a file, or enters data into a spreadsheet.
the result
What Changed: Continuous Context Instead of Periodic Snapshots
The practical difference is not prettier charts. It is that every health decision now has context available in seconds. Before a doctor's appointment, asking "summarize everything since my last visit" produces a briefing: what changed in bloodwork, current medication regimen, sleep trends, any logged symptoms, and open questions. The conversation with the doctor starts from a shared understanding instead of "so what's been going on?" When a new medication was started (atorvastatin for elevated LDL), the system tracked the next lipid panel automatically and compared the pre and post values. The retest reminder was created at the time the prescription started. No calendar entry was made manually. A dietary experiment (increasing omega-3 intake via sardines three times per week) was tracked against inflammatory markers over two draw cycles. The system showed whether the change moved the needle because both the food log and the lab data lived in the same database. The biggest change is compliance. Fasting schedules, medication timing, supplement doses, sleep targets: the system tracks all of them and reports honestly. When compliance slips, the data shows it. When it holds, the trends confirm it. The feedback loop that makes health tracking useful is measured in hours, not months.
the stack
Technical Details: Node.js, SQLite, OpenClaw, and Standard Protocols
The core is a Node.js CLI backed by SQLite. Every health metric, lab result, food entry, medication dose, and symptom log lives in one database. The CLI exposes subcommands that return structured JSON: compliance, sleep, nutrition, running, fasting, trend, compare, and about twenty others. The agent calls these through OpenClaw's plugin system and renders the results in natural language. Data ingestion uses four paths: HTTP webhook for wearable data (Health Auto Export pushes JSON to a local endpoint behind a Cloudflare Tunnel), IMAP monitoring for emailed lab results, conversational input through Telegram for food and symptoms, and CalDAV for calendar integration. Each path is independent. Adding a new data source means writing an ingestion handler, not redesigning the system. The lab report parser is deterministic: table extraction from PDF, regex-based marker identification, canonical name mapping from a reference table. No LLM is involved in parsing or storing lab values. The LLM handles natural language interaction, summarization, and the daily briefing narrative. The boundary between deterministic computation and language model inference is explicit throughout the system. OpenClaw provides the orchestration: plugin registration for each CLI tool, cron scheduling for automated reports and reminders, and multi-channel messaging so the same system can deliver to Telegram, Signal, or email without per-tool messaging code. Cross-tool orchestration happens naturally because all tools are registered in the same agent instance. Ingesting a blood draw, creating a retest calendar event, and messaging a summary all happen in one turn.
Deployment model, privacy architecture, and the engagement process.
The same system configured for businesses, practices, and other individuals.
This is one configuration of one system.
The same architecture that tracks personal health data powers document review for law firms, patient intake for clinics, and operations coordination for construction companies. The conversation starts with your specific situation.