Skip to content
FitWise

FitWise

Get fitter with the power of AI

Created on 21st June 2025

•

FitWise

FitWise

Get fitter with the power of AI

The problem FitWise solves

FitWise 🏋️‍♂️🤖

FitWise is an intelligent AI-powered workout assistant that combines Agentic AI, RAG-enhanced knowledge, and MediaPipe pose detection to create personalized workout routines and provide real-time form correction — designed for fitness enthusiasts at every level.


🚀 Core Features

🧠 Agentic AI Workflow

  • Intelligent Chat Assistant: Natural language conversation for fitness advice and workout creation
  • Tool-Based Execution: Uses specialized tools for workout generation, exercise config creation, and data persistence
  • Context-Aware Responses: Maintains conversation flow with multi-step reasoning
  • User Session Management: Personalized experience with login/logout functionality

🎯 Dynamic Workout Generation

  • Personalized Routines: AI creates workouts based on goals, equipment, experience level, and duration
  • Unlimited Exercise Support: No longer limited to predefined exercises - AI generates tracking configs for any exercise
  • Automatic Exercise Config Generation: MediaPipe pose tracking configurations created dynamically using LLM analysis
  • Smart Caching: Efficient reuse of generated configurations for performance
  • Database Integration: Saves workouts with linked exercise configurations for future use

📚 RAG-Enhanced Knowledge System

  • Vector Database: Qdrant-powered embedding storage of exercise science research
  • Relevance Filtering: Only uses high-relevance content (70%+ similarity) for responses
  • Evidence-Based Recommendations: Leverages latest research in biomechanics, anatomy, and exercise science
  • Source Citation: References specific research sources in responses
  • LM Studio Integration: Local embedding generation using text-embedding models

📷 Advanced Pose Detection & Analysis

  • MediaPipe Integration: Real-time pose landmark detection via webcam
  • Multi-Joint Tracking: Composite angle analysis from multiple body joints
  • Adaptive Peak Detection: Intelligent rep counting with trend analysis
  • Target Angle Guidance: ROM (Range of Motion) optimization with personalized targets
  • Bilateral Tracking: Left and right side angle measurements for balanced analysis

✅ Intelligent Real-Time Feedback

  • AI-Powered Analysis: LLM-based feedback generation considering form, tempo, and ROM
  • Configurable Performance Modes:
    • Fast Mode: Quick text feedback for immediate responsiveness
    • Enhanced Reference: RAG-enhanced feedback with research backing
    • Voice Feedback: Spoken guidance in Bengali for hands-free operation
    • Combined Mode: Both enhanced reference and voice for comprehensive feedback
  • Scoring System: 0-100 performance scores with "good/okay/bad" classifications
  • Progressive ROM Targets: Adjustable range of motion goals (Low/Standard/High/Maximum)

🛠️ User Interface & Experience

  • Modern SvelteKit Frontend: Built with shadcn/ui components for a clean, responsive design
  • Dashboard Overview: Centralized view of workouts, progress, and AI interactions
  • Exercise Config Management: Visual interface for viewing and testing generated configurations
  • Form Analysis Page: Real-time pose detection with visual feedback
  • Workout Library: Save, organize, and access personalized workout routines
  • Mobile-Responsive: Works seamlessly across desktop and mobile devices

🤖 Agentic AI Workflow

FitWise implements a sophisticated agentic AI system that orchestrates multiple tools and knowledge sources to provide comprehensive fitness assistance:

Editor _ Mermaid Chart-2025-06-22-011233

Agentic Components:

  1. Query Analysis Agent: Determines if queries are fitness-related and routes appropriately
  2. RAG Retrieval Agent: Searches vector database for relevant exercise science research
  3. Workout Generation Agent: Creates personalized routines using evidence-based principles
  4. Exercise Config Agent: Generates MediaPipe configurations for any exercise dynamically
  5. Persistence Agent: Manages user data, workout storage, and exercise configurations
  6. Feedback Agent: Provides real-time form analysis using pose detection data

Tech Stack

Frontend & UI

  • SvelteKit: Modern web framework with server-side rendering
  • shadcn/ui: Beautiful, accessible component library built on Radix UI
  • Tailwind CSS: Utility-first CSS framework for rapid styling
  • TypeScript: Type-safe development with enhanced developer experience

AI & Machine Learning

  • Vercel AI SDK: Agentic framework for tool-based AI interactions
  • LM Studio: Local LLM inference for chat and embedding generation
  • MediaPipe: Google's pose detection and landmark tracking
  • OpenAI-Compatible API: Flexible model integration

Challenges I ran into

🚧 Challenges I Ran Into

Building FitWise presented several unique technical challenges that required innovative solutions:

MediaPipe Angle Data Preprocessing

Transforming raw MediaPipe pose landmarks into meaningful angle data for LLM consumption was more complex than anticipated. The challenge involved:

  • Noisy Landmark Data: MediaPipe outputs can be jittery, requiring sophisticated smoothing algorithms
  • Multi-Joint Coordination: Creating composite angle signals from multiple body joints while maintaining biomechanical accuracy
  • Peak Detection Logic: Developing adaptive algorithms to detect rep peaks/valleys across different exercise patterns
  • Angle Normalization: Ensuring angle data is consistent and interpretable for downstream LLM analysis

Solution: Implemented weighted composite angle calculations with moving average smoothing and adaptive peak detection that considers exercise-specific movement patterns.

Real-Time Model Streaming with Minimal Latency

Achieving fast response times while coordinating multiple AI models (LLM, RAG, TTS) proved challenging:

  • RAG Pipeline Bottleneck: Vector search in Qdrant + embedding generation + LLM processing created latency spikes
  • Streaming Conflicts: Balancing real-time pose feedback with chat-based AI responses
  • Memory Management: Local models consuming significant RAM while maintaining smooth pose detection
  • Tool Coordination: Managing sequential tool calls without blocking the UI

Solution: Implemented relevance thresholding (70%+) for RAG, aggressive caching of exercise configs, and background streaming with tool call optimization.

Quality Data Scraping for RAG Embeddings

Building a robust knowledge base from exercise science content required careful data curation:

  • Content Quality: Filtering scientific articles from fitness blog spam and misinformation
  • Source Diversity: Balancing peer-reviewed research with practical training insights
  • Embedding Consistency: Ensuring local embedding models produce meaningful vector representations
  • Data Structure: Organizing scraped content for optimal retrieval performance

Solution: Focused on reputable sources (RPStrength, research papers), implemented content validation, and used proven embedding models like all-MiniLM-L6-v2.

Local Model Quality vs. Speed Trade-offs

Running everything locally for privacy while maintaining performance created difficult compromises:

  • Model Size Limitations: Smaller models (3B-4B parameters) vs. quality of larger cloud models
  • Hardware Constraints: Balancing LLM inference, embedding generation, and MediaPipe processing on consumer hardware
  • Response Quality: Local models sometimes producing less nuanced feedback compared to GPT-4 class models
  • Context Length: Smaller models struggling with long conversation history and complex RAG context

Solution: Chose qwen3-4b for good instruction following, implemented smart context truncation, and optimized prompts for smaller model capabilities while maintaining acceptable quality.

Progress made before hackathon

Pre-Hackathon Foundation: While FitWise was built entirely from scratch for this hackathon, I brought valuable experience from previous hackathon projects where I had experimented with MediaPipe for basic pose detection.

However, this project represents a significant evolution - the integration of agentic AI capabilities, RAG-enhanced knowledge systems, and dynamic exercise configuration generation were all novel implementations developed specifically for FitWise.

No code was directly copied from previous projects; instead, the foundational understanding of MediaPipe's pose landmark system provided a launching point for building the sophisticated angle preprocessing, multi-joint tracking, and real-time feedback systems that make FitWise unique.

The agentic workflow orchestrating multiple AI tools, the vector database integration, and the intelligent exercise configuration generation were entirely new challenges that pushed beyond simple pose detection into the realm of comprehensive AI-powered fitness assistance.

Tracks Applied (1)

Sarvam AI Track

Used the TTS (Text-To-Speech) endpoint for real-time voice feedback during live workouts.
Sarvam.ai

Sarvam.ai

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion

Builders also viewed

See more projects on Devfolio