← all repositories
StanfordBDHG/HealthGPT

Query HealthKit via GPT-4, Llama 3, or your home server

It exists because manually correlating sleep, steps, and heart rate in Apple Health is a chore best outsourced to an LLM.

2k stars Swift Domain AppsChat Assistants
HealthGPT
Not currently ranked — collecting fresh signals.
star history

What it does

HealthGPT is an experimental iOS app built on Stanford’s Spezi framework that exposes your Apple Health data—sleep, steps, heart rate, and a handful of other metrics—to a chat interface. You type or speak a question, and the app queries HealthKit, packages the last 14 days of aggregated data into a prompt, and routes it to a language model for a conversational answer. It is explicitly not a medical device; it is a reference implementation for LLM-powered health apps.

The interesting bit

The project offers three distinct inference modes: OpenAI’s GPT-3.5/4 in the cloud, a fully local Llama 3 8B running on your iPhone’s Metal GPU, or a “fog” node on your home network discovered via mDNS. That last option is the unusual one: you can park a Docker-based inference server on a local Linux or macOS machine and have the phone stream requests to your own hardware, keeping data off the public cloud while sparing the phone from on-device inference.

Key highlights

  • Built on the open-source Stanford Spezi digital-health framework, so the HealthKit plumbing and chat UI are modular and extensible.
  • Ships with out-of-the-box support for sleep, step count, active energy, exercise minutes, heart rate, and body mass queries.
  • Can run entirely offline using SpeziLLMLocal with Llama 3 8B after an automated model download during onboarding.
  • Supports a local-network “fog” mode via mDNS for low-latency, private inference on a nearby machine.
  • Includes accessibility features such as speech-to-text input and text-to-speech synthesis in the chat interface.

Caveats

  • The README warns that LLMs hallucinate and the app is not a substitute for professional medical advice; aggregated HealthKit data for the past 14 days is uploaded to OpenAI when using cloud mode.
  • Local LLM inference requires a physical iOS device with a modern Metal GPU and will not run in the simulator.
  • Extending support to additional HealthKit quantities requires manual edits to three separate Swift files (AppDelegate.swift, HealthDataFetcher.swift, and PromptGenerator.swift).

Verdict

Worth a look if you are building iOS health apps and need a working reference for integrating HealthKit with LLMs; skip it if you are seeking a polished consumer health product or a no-code way to add natural-language queries to your own data.

Frequently asked

What is StanfordBDHG/HealthGPT?
It exists because manually correlating sleep, steps, and heart rate in Apple Health is a chore best outsourced to an LLM.
Is HealthGPT open source?
Yes — StanfordBDHG/HealthGPT is open source, released under the MIT license.
What language is HealthGPT written in?
StanfordBDHG/HealthGPT is primarily written in Swift.
How popular is HealthGPT?
StanfordBDHG/HealthGPT has 2k stars on GitHub.
Where can I find HealthGPT?
StanfordBDHG/HealthGPT is on GitHub at https://github.com/StanfordBDHG/HealthGPT.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.