DEV Community

gonzalo nuñez
gonzalo nuñez

Posted on

FitGuard AI: Building a Real-Time Fitness Coach with Gemini Live API and Brain Endurance Training

FitGuard AI 💪 — Real-Time AI Fitness Coach powered by Gemini

The Problem

70% of people quit their fitness routine due to mental burnout. 30% get injured due to poor technique. I built FitGuard AI to solve both problems using Google's Gemini AI.

What is FitGuard AI?

FitGuard AI is a multimodal fitness agent that combines:

  • 🧠 Brain Endurance Training (BET) — a neuroscience protocol to elevate brain frequency to 50Hz before training
  • 📹 Real-time posture analysis — Gemini Vision detects biomechanical errors and injury risks
  • 🎙️ Live voice coaching — Gemini Live API for real-time bidirectional voice interaction
  • 🌙 Holistic recovery plans — personalized nutrition, stretching, and rest recommendations

The BET Protocol

Brain Endurance Training is a scientifically validated technique that trains the brain under cognitive fatigue to improve mental resilience. FitGuard AI implements a 4-step interactive protocol:

  1. Working Memory — reverse number sequences under a timer
  2. Mental Calculation — speed arithmetic under pressure
  3. Visual Pattern Recognition — identify sequences
  4. Neural Breathing — synchronized breathing to activate gamma waves

The system estimates your brain frequency in Hz and adjusts your workout recommendation accordingly.

Tech Stack

  • Frontend: Streamlit
  • AI: Google Gemini 2.5 Flash (text + vision)
  • Voice: Gemini Live API with native audio (WebSockets)
  • Deploy: Google Cloud Run
  • SDK: google-genai Python

Live Demo

🌐 Try it: https://fitguard-ai-867186428147.us-central1.run.app
💻 GitHub: https://github.com/gonzaloayrtonn-code/fitguard-ai

Built for the #GeminiLiveAgentChallenge

gemini #googleai #GeminiLiveAgentChallenge #fitguardai

Top comments (0)