HealthGPT: natural language queries over Apple Health, built on Stanford Spezi
Query your Apple Health data with natural language 💬 🩺
At a glance
- What is it?
- StanfordBDHG/HealthGPT is an experimental iOS app that turns HealthKit data into prompts for GPT-3.5, GPT-4 or a local Llama3 8B model. It is a reference implementation for Spezi, not a finished consumer product.
- Who is it for?
- Build HealthGPT if you are an iOS or Swift developer who wants a working Spezi example of HealthKit plus LLM prompting, and you accept that the cloud path uploads 14 days of aggregated HealthKit data. Do not adopt it if you need a shipping product with a stable data schema, a documented prompt contract, or support for health data types beyond the six the README lists.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 78 days ago.
- What is it written in?
- Mainly Swift, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 28, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What HealthGPT actually is, and who it is for
The Apple Health app shows numbers. It does not answer questions like how sleep tracked against exercise minutes over the last two weeks. HealthGPT closes that gap with a chat interface: the user asks in natural language, the app pulls the relevant HealthKit samples, formats them into a prompt, and sends that prompt to a language model. The README describes it as "an experimental iOS app based on Stanford Spezi that allows users to interact with their health data stored in the Apple Health app using natural language."
The target reader is a developer, not a patient. The README frames the project as "an easy-to-extend solution for those looking to make large language model (LLM) powered apps within the Apple Health ecosystem," and the extension path it documents is code, not configuration. It is an open-source project of the Stanford Biodesign Digital Health team, with the initial Spezi-based prototype credited to Varun Shenoy. The word experimental appears in the first sentence of the description, and the disclaimer repeats the warning about hallucination. Treat that as the intended register.
The data path: HealthKit to prompt to model
Three files carry the mechanism, and the README names all three. HealthGPTAppDelegate.swift holds the SpeziHealthKit configuration, which declares which HealthKit quantities and categories the app is allowed to read. HealthDataFetcher.swift builds the queries against those types and collects the results. PromptGenerator.swift turns the fetched values into text that the OpenAI API can consume. Adding a new data type means touching all three in that order.
Out of the box the app supports six signals: sleep, step count, active energy, exercise minutes, heart rate, and body mass. Everything else requires the three-file edit. That is a deliberate design choice rather than an oversight, because HealthKit types differ enough in shape that a generic serializer would flatten units and aggregation windows in ways the model cannot interpret. The cost is that the app ships with a fixed vocabulary of questions it can answer well.
The chat surface comes from SpeziChat, which the README credits with speech-to-text recognition, text-to-speech synthesis, and chat export. Model access goes through SpeziLLM for GPT-3.5 and GPT-4, and SpeziLLMLocal for on-device execution with Llama3 8B, including automated download and storage of model files during onboarding. A newer path, fog mode, discovers a machine on the local network over mDNS, connects to it, and streams responses back while dispatching inference tasks. The README points at FogNode/README.md for running a minimal Docker-based fog node on Linux or macOS.
Building HealthGPT from source and asking a first question
The README states that building and running HealthGPT requires a Mac with Xcode 16.2 or newer. There is no package manager step and no server component for the default cloud path. Clone the repository, open the project in Xcode, wait for dependencies to resolve, then run on a device or simulator.
git clone https://github.com/StanfordBDHG/HealthGPT.git
cd HealthGPT
open HealthGPT.xcodeprojAfter the project opens, Xcode resolves the Spezi package dependencies and indexes the source. The README says to wait for both to finish before running. Then select an iOS device or simulator as the destination and run the app.
# In Xcode: select the HealthGPT scheme, choose a destination, then Run (Cmd+R)The first launch walks through onboarding, which includes model file download if you pick the local LLM option. Grant Health access when iOS prompts for it. Then ask something the six supported types can answer, for example a question about step count or sleep over the past two weeks.
One trap is documented explicitly. If you run in the simulator, you must add data to the Apple Health app manually, otherwise every result reads zero. The second trap is the local model: SpeziLLMLocal needs a modern Metal MTLGPUFamily, and simulators do not provide it, so on-device Llama3 8B requires a physical device. The README also links a TestFlight build for readers who want to try the app without building it.
Where the cloud path sends your data
The disclaimer is unusually direct: aggregated HealthKit data for the past 14 days is uploaded to OpenAI. That single sentence should decide the architecture for most readers. The app is not summarizing on device and sending only a question. It sends the health values themselves. Anyone evaluating this for real use needs to read HealthDataFetcher.swift and PromptGenerator.swift to see the exact aggregation and formatting, because the README does not spell out the units, the sampling window within those 14 days, or how missing samples are represented.
The alternative paths exist for this reason. SpeziLLMLocal keeps inference on the device with Llama3 8B, at the cost of a physical device and a model download during onboarding. Fog mode keeps inference on hardware the operator controls inside their own network, which the README describes as providing low latency, strong performance, and improved privacy. Neither path removes the need to audit what the fetcher collects, but both remove OpenAI from the loop.
The second limitation is model behaviour. The disclaimer states that large language models such as those provided by OpenAI are known to hallucinate and at times return false information, and that HealthGPT is not a substitute for professional medical advice, diagnosis, or treatment. A chat interface makes a wrong answer look the same as a right one. Nothing in the README describes a confidence indicator, a citation back to the underlying HealthKit samples, or a validation layer between the model output and the user.
HealthGPT compared with Apple's own Health summaries
The obvious alternative is the Apple Health app itself. It already aggregates steps, sleep, heart rate and the rest, and it presents trends without sending anything to a third party. The difference is the query model. Apple Health offers fixed views and a small set of trend cards; you read what it decided to show. HealthGPT accepts an arbitrary phrasing and generates the answer, which is exactly why it can be wrong in ways a fixed chart cannot.
A second comparison is building the same thing yourself on Spezi without HealthGPT. The project is a template in that sense: SpeziTemplateApplication is credited as the starting point, and the README's extension instructions are really instructions for forking. If your app needs a different chat surface, a different model provider, or a different set of HealthKit types, the value you get from HealthGPT is the wiring between SpeziHealthKit, SpeziChat and SpeziLLM, not the app shell. Adopting it wholesale means inheriting its six-type vocabulary and its prompt format.
A third option is exporting Health data and asking questions in a general chat tool. That moves the data outside the app sandbox entirely and loses the HealthKit permission model, which is a worse trade for anything beyond one-off curiosity.
Maintenance, licence and upgrade cost
The repository is not archived, and the last push was on 2026-07-14, which is the same date as the 0.5.1 release. The release history before that is uneven: 0.5.0 on 2025-09-26 and 0.4.1 on 2025-05-11. That cadence suggests a small team shipping when a change is ready rather than a fixed schedule, so plan for the possibility of long gaps between tags.
Upgrade cost concentrates in the three files the README names. A SpeziHealthKit change can move configuration out from under HealthGPTAppDelegate.swift, and a SpeziLLM change can alter how prompts are constructed. Because the app depends on several Spezi packages, a Swift or Xcode upgrade can cascade through all of them at once. The repository carries .swiftlint.yml and .periphery.yml, plus fastlane and a deployment workflow, so there is tooling to catch dead code and style drift, but no compatibility matrix in the README.
Licensing is MIT, stated in the README and in the SPDX headers at the top of source files, with a LICENSES directory and REUSE.toml for per-file metadata. MIT is permissive, so redistribution and modification are allowed with the copyright notice preserved. Note that the MIT licence covers the code, not the models: OpenAI usage and Llama3 usage carry their own terms, and the README links the OpenAI privacy policy rather than restating it. That is a reading task, not a legal conclusion, and it is worth doing before shipping anything derived from this.
Editorial conclusion
Build HealthGPT if you are an iOS or Swift developer who wants a working Spezi example of HealthKit plus LLM prompting, and you accept that the cloud path uploads 14 days of aggregated HealthKit data. Do not adopt it if you need a shipping product with a stable data schema, a documented prompt contract, or support for health data types beyond the six the README lists. Before you commit, read HealthDataFetcher.swift and PromptGenerator.swift to see exactly what leaves the device, and check FogNode/README.md if you intend to keep inference inside your own network.
Frequently asked questions
What is HealthGPT AI?
It is an experimental iOS app from the Stanford Biodesign Digital Health team that lets you query Apple Health data in natural language. It is built on the Stanford Spezi framework and sends prompts to GPT-3.5, GPT-4, or a local Llama3 8B model.
Is there a medical version of ChatGPT?
HealthGPT is not a medical version of ChatGPT. The README states it is provided for general informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment, and it warns that the underlying models can return false information.
What is GPT health?
The project uses GPT-3.5 and GPT-4 through the SpeziLLM module to answer questions about the user's own HealthKit data. It is not a separate model; it is an app that formats HealthKit values into prompts for those models.
What is the best free AI tool for medical diagnosis?
HealthGPT is not a diagnostic tool and the README does not position it as one. It is an open-source MIT-licensed iOS app for querying your own Apple Health data, and its disclaimer directs users to consult a qualified healthcare provider for personalized advice.
what is health gpt
It is the same project: an experimental iOS app on top of Stanford Spezi that reads HealthKit data and answers natural language questions about sleep, step count, active energy, exercise minutes, heart rate, and body mass.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/stanfordbdhg-healthgpt)