AI & healthcare
HIPAA-compliant AI agent platform for Lifestyle Medicine
A family of evidence-based AI assistants for clinicians and health coaches, with RAG, multi-agent fact-checking, citation verification and encrypted patient records, running on AWS Bedrock.
- Client
- Lifestyle Medicine AI™ by Lifestyle Prescriptions® University
- Services
- AI agent engineering, RAG pipelines, HIPAA-compliant back end, Cloud infrastructure, Web app development
- Date
- June 2024
Lifestyle Medicine AI™ gives healthcare professionals and health coaches a set of AI assistants trained on evidence-based Lifestyle Medicine: protocols, research, remedies and biomarkers, psychosocial stressors, micro-habit Lifestyle Prescriptions® and a 24/7 self-care coach. It also includes a clinical workspace where a physician works on a patient’s full record with AI. We have designed, built and run the whole platform since 2024: the API, the AI layer, the infrastructure and the web apps.
The challenge
Clinicians can’t use a chatbot that makes up references or leaks patient data. Every answer had to be grounded in a curated body of Lifestyle Medicine knowledge, every citation had to point to a real paper, and anything touching a patient had to meet HIPAA requirements. On top of that, the client wanted to add new assistants, change models and tune behaviour without a developer, and run it all for a global audience at a $16 a month price point.
What we built
Each assistant is a configuration rather than separate code. In the admin console the client picks the model, the runtime (a Bedrock Agent, or direct streaming through the Converse API), the knowledge bases, guardrails, verbosity and system instructions. The platform runs on open-weight models hosted on Bedrock, including Qwen3, DeepSeek, Gemma and Mistral, so swapping a model is a settings change.
Every question goes through an orchestration pipeline. A cheap router filters out small talk before any vector search. Retrieval combines Bedrock Knowledge Bases with a local HNSW index per assistant, built from the client’s PDFs with Titan v2 embeddings, and drops chunks below a similarity threshold. The context is assembled with numbered sources and page references, and the conversation history is trimmed to fit the model’s context window.
In research mode a fact-checker agent extracts the claims in the draft and pulls supporting papers from Semantic Scholar and ScholarAI before the model writes its answer. A citation resolver then checks every reference against OpenAlex, Crossref and Semantic Scholar. A citation is kept only if its author and year appear in the retrieved knowledge base, and anything near drug or dosage advice is rejected. Answers stream to the browser over SSE, with hover cards showing the paper, journal, abstract and citation count.
The clinical workspace adds agent actions over the patient record: history summaries, a vision agent that reads uploaded lab reports, lab comparisons, health plans and micro-habit Lifestyle Prescriptions®. Each action declares what it needs (free text or a file) before it runs. Follow-up question suggestions and notification dispatch run as background jobs on BullMQ.
Patient data is protected at every step. Remote intake links carry a 32-byte random token; only its SHA-256 hash is stored, the link works once and expires, and the token lives in the URL fragment, so it is never sent to a server and is exchanged for a short-lived httpOnly cookie. Submitted answers are encrypted per field with AES-256-GCM, bound to their database row with additional authenticated data, and use versioned keys so they can be rotated without a migration. Four consents, including HIPAA consent, are enforced by the API, and clinical records sit behind role-based access and a clinician PIN lock.
One API runs every agent, model call and patient record, clustered across every core on AWS and shipped with continuous deployment on every push. Four apps sit on top of it: the AI assistants web app in six languages, the admin console where the client tunes each assistant, a public coach directory and the iOS and Android app.
- Configurable AI assistants: model, runtime, knowledge bases and guardrails set per assistant, with no code changes
- Hybrid RAG: Bedrock Knowledge Bases plus a local HNSW vector index, with query routing and score thresholds
- Multi-agent pipeline: fact-checker, citation resolver, follow-up question, lab report vision and clinical action agents
- No made-up references: citations verified against OpenAlex, Crossref and Semantic Scholar and grounded in retrieved sources
- HIPAA safeguards: AES-256-GCM field encryption, single-use hashed intake links, enforced consents and a clinician PIN lock
- Model-agnostic on AWS Bedrock: Qwen3, DeepSeek, Gemma and Mistral, streamed over SSE
- One API serving four apps, in production since 2024 with more than 3,000 commits