Inspiration
Through my sister, I've seen firsthand the struggles that come with managing epilepsy every single day. Seizures rarely come from a single obvious cause; they come from small things stacking up over time, and most existing tools do almost nothing to surface that before it becomes a problem.
Frustrated and motivated, we wanted to build something that fit into a real person's day without demanding attention, something that quietly tracked what mattered and said something useful when it did. We wanted to build something my sister could actually use without feeling overwhelmed.
What it does
epi is an iOS app and iMessage interface that tracks the health signals most relevant to seizure risk: sleep quality, heart rate, movement patterns, and medication adherence. It combines them into a continuously updated risk score and surfaces insights in plain language without requiring the user to do much of anything.
Open the app, and you see your current risk level, the signals driving it, and an automatically generated summary of what your data actually means. The system passively collects through HealthKit and CoreMotion, updates the risk model in real time, and generates new insights as conditions change.
There's also a conversational layer built directly into iMessage, where users can check in, ask questions, or just get a quick read on how they're doing. It's grounded in the same live data the risk engine uses, not a generic chatbot wrapper.
Miss a medication dose, and the risk score adjusts. Sleep poorly three nights in a row, and that factors in too. The goal was a system that feels reactive and honest, rather than passive. A system that learns from you to predict when you will have a seizure, and works with you to prevent that.
Impact
65 million people worldwide are affected by epilepsy. A lot of seizures that could have been avoided are caused by not taking medicine, and most of the time, people don't mean to do it. We have tried and seen firsthand how the tools that are available don't do enough to fill that gap.
Apps right now are either too clinical to use all the time or too shallow to be of any real use. epi tries to find a middle ground between those two: it is passive enough not to be a burden, but specific enough to matter when the risk is high. It's an app with a dashboard and metrics when you need it, and a friendly companion in iMessages when you need that!
Innovation
Dual interaction model. Most epilepsy apps are purely passive. You log things, you look at charts. epi has both a dashboard and a conversational interface, so users can engage with their own health data however makes sense in the moment.
Calculating risk in real time. The risk score changes automatically when new data comes in. It changes if you miss a dose. It changes when you don't sleep well. A strange pattern of movement changes it. Signals are not just shown next to each other; they are weighted and combined.
Gemini-powered physiological summarization, informed by OpenTSLM. Instead of surfacing raw numbers or generic tips, we use Gemini on the backend to generate specific, readable memories from the raw multimodal time series data. The Stanford Spezi Lab's OpenTSLM preprint shaped how we structured our physiological inputs and approached clinical time series reasoning.
Most tools treat each signal in isolation. Through epi, our multimodal approach treats them as a system. Sleep, medication, heart rate, and activity all interact, and the risk engine, generated memories, and warnings all reflect that.
Functionality and Design
A recorded demonstration of our entire application is linked in the video demo link section.
Code Complexity/Organization
Our code is consolidated into four repositories: Website, App, iMessage presence, and OpenTSLM.
The core flow chart of our system can be seen in the project media section.
Challenges we ran into
HealthKit background delivery was harder than expected. Getting data to flow reliably when the app isn't active requires careful background mode configuration and debugging around edge cases in health data permissions. However, using the Spezi Modules, we were able to seamlessly integrate personal health data.
Structuring time series payloads for the OpenTSLM model was difficult to debug until it consistently produced an output of usable clinical memories. Prompt structure, data formatting, and how we represented temporal context all mattered more than we initially expected. The Llama model, model checkpoints, and custom transformer weights took several tries and references to public resources to get working effectively.
Designing the risk scoring model was as much a judgment call as a technical one. Deciding how to weight signals, heavily backed by research papers, as well as how to communicate uncertainty to the user honestly without making any bold claims, took a lot of consideration and iteration.
Because of the technical depth of our project, there was minimal time to put together explanations for our code and the Devpost submission itself, but we successfully managed to submit on time.
What we learned
Time series data is messy in practice. Missing values, irregular sampling intervals, and inconsistent HealthKit delivery windows all need to be handled before anything goes to a model. Preprocessing is not a footnote.
FastAPI was a strong choice for the inference API. The async support made handling concurrent requests straightforward, which matters when you're targeting real-time behavior.
What's next
- Letting a family member see the risk state with appropriate permissions would make epi meaningfully more useful for the people supporting someone with epilepsy day to day.
- The system currently operates on recent data. With enough history, it should be possible to surface personal triggers and patterns that aren't obvious from any single week.
- Apple Watch integration would let CoreMotion run continuously and open up additional physiological signals beyond what the phone alone can capture.
- A clean export or read-only view for neurologists would let epi feed into actual medical conversations rather than existing in parallel to them.
Log in or sign up for Devpost to join the conversation.