Inspiration
Mental-health apps often fall into two extremes: static wellness content or AI chatbots that try to keep users talking.
We wanted to build something different.
LoopBreak AI is based on a simple idea: when someone is stressed, overthinking, overwhelmed, or low on energy, they may not need a long conversation. Sometimes they need one small, appropriate action that helps them move forward.
Our goal was to build an AI system that helps the user leave the screen, not become dependent on it.
Break the loop. Take one small step.
What it does
LoopBreak AI is a privacy-first adaptive mental-wellness application.
The user completes a quick check-in:
- How stressed do you feel right now?
- How much mental or physical energy do you have?
- What is happening right now?
- How much time do you have?
- What environment are you in?
LoopBreak then:
- Runs a local safety check.
- Builds a structured context from the user's answers.
- Filters out unsuitable interventions.
- Uses an adaptive LinUCB contextual-bandit recommender to rank safe micro-interventions.
- Selects one 1–5 minute reset.
- Explains why that action was selected.
- Collects feedback after completion.
- Learns which interventions are more helpful for similar future situations.
Examples include grounding, rumination interruption, task-overwhelm reduction, social reconnection, and short mental resets.
LoopBreak does not diagnose mental-health conditions or act as a therapist.
How we built it
We designed LoopBreak as a hybrid local-first AI system.
Frontend
- React
- TypeScript
- Vite
- Tailwind CSS
- IndexedDB
Sensitive information such as detailed check-ins, private notes, personal history, and personalization state stays in the user's browser.
AI/ML
The recommendation pipeline is:
Safety → Context → Eligibility → LinUCB → Intervention → Feedback → Model Update
A contextual-bandit model learns from user feedback over time.
The model never receives unlimited control over the application's wellness content. It can only rank interventions from a predefined, approved intervention library.
Gemini
We use Gemini as a communication layer.
Gemini can make the explanation of an already-selected intervention feel more natural and human, but it cannot:
- choose the intervention
- diagnose the user
- override safety rules
- prescribe medication
- invent new treatment
If Gemini is unavailable, LoopBreak falls back to a local deterministic explanation.
Backend
We use:
- FastAPI
- Render
- Neon PostgreSQL
- Gemini API
The FastAPI backend keeps API credentials server-side and handles Gemini communication and optional anonymous analytics.
Privacy
LoopBreak does not require a name, email, or account.
A random anonymous ID can be generated locally for optional anonymous analytics.
Neon stores only non-sensitive information such as intervention IDs, completion status, anonymous reward signals, and technical metrics.
Private notes are not sent to Gemini or stored in Neon.
Challenges we ran into
One of the biggest challenges was deciding how much control AI should have in a mental-health application.
Allowing an LLM to freely generate wellness advice would have been easier, but it introduced safety, privacy, and hallucination concerns.
We solved this by separating responsibilities:
- deterministic rules handle safety
- eligibility rules constrain possible actions
- ML ranks only approved interventions
- Gemini handles natural communication
Another challenge was personalization for new users. A new user has no history, so we implemented a cold-start strategy and gradually allow the contextual-bandit model to learn as feedback becomes available.
We also spent significant time making the UI feel calm and human instead of looking like a medical dashboard or generic AI chatbot.
Accomplishments that we're proud of
We are especially proud that LoopBreak:
- uses real adaptive ML instead of simply wrapping an LLM API
- keeps sensitive wellness data local
- provides explainable recommendations
- can continue working when the LLM is unavailable
- structurally prevents the LLM from choosing treatments
- learns from user feedback over time
- requires no account or personal identity
- has a clean, accessible, responsive user experience
One of our favorite design principles became:
AI that helps you stop using AI.
What we learned
This project taught us that responsible AI is not just about writing a safer system prompt.
Safety can be built directly into the architecture.
We learned how to combine:
- local-first data storage
- contextual-bandit personalization
- constrained recommendation systems
- LLM communication
- backend API security
- privacy-aware product design
We also learned that good mental-health technology should communicate uncertainty and avoid presenting wellness recommendations as medical conclusions.
What's next for LoopBreak AI
Next, we would like to:
- expand the evidence-informed intervention library
- evaluate the recommender with more user feedback
- improve personalization across different situations
- add stronger accessibility features
- conduct expert review of the intervention content
- improve offline/PWA capabilities
- explore privacy-preserving multi-device synchronization
The long-term goal is to make LoopBreak a lightweight, responsible system that gives people the right small action at the right moment without trying to replace real human or professional support.
Built With
- contextual-bandits
- fastapi
- gemini
- google-gemini
- indexeddb
- linucb
- machine-learning
- neon
- postgresql
- privacy
- pwa
- python
- react
- render
- responsible-ai
- tailwind-css
- typescript
- vite

Log in or sign up for Devpost to join the conversation.