Skip to content

Repository files navigation

⚡ Antigravity Coach — Advanced AI Athletics & Recovery Director

A multi-agent fitness orchestrator built with the Google Agent Development Kit (@google/adk) and powered by gemini-3.5-flash. It seamlessly synchronizes Strava workouts, nutrition logs, daily targets, and multimodal meal vision to engineer real-time, personalized recovery and athletic guidance.

🌐 Live Deployment: https://ai-assistant-zrxlwy37va-uc.a.run.app/


🚀 Key Features

  • ReAct Multi-Agent Orchestration: Driven by @google/adk and gemini-3.5-flash to execute complex decision trees using custom tools.
  • Multimodal Meal Vision: Uses Gemini's native vision capability to analyze food photography, estimate macronutrients, and log meals instantly.
  • Live Strava Integration: Connects with the Strava API v3 to pull exercise durations, distances, and training loads dynamically.
  • Weekly Context-Aware Analysis: The daily assessment agent absorbs the user's weekly Strava workout stream, directly parsing and citing these workouts inside its personalized, detailed physical strain coaching reviews.
  • Crisp Modular Card UI: The program blueprint onboarding page partitions heavy text into styled, interactive glassmorphic cards (Diagnostic, Training Split, Nutrition, Recovery, Actions) utilizing responsive grid layouts and hover animations to reduce cognitive bloat.
  • Active Recovery & Catch-up Nutrition: When the agents detect metabolic or athletic gaps, they automatically prescribe tailored, active recovery workouts and target catch-up meals.
  • Real-time Decision Tracing: Displays the agent's step-by-step thinking and tool execution trace directly in the UI.
  • Graceful Cache Fallbacks: Built-in caching layers ensure the application remains fully functional for live demos even during API rate limits or network offline states.

🤖 Multi-Agent Architecture & Communication

The system runs a sequential-parallel delegation pipeline comprised of four distinct agents:

┌────────────────────────────────────────────────────────┐
│                      Onboarding                        │
└──────────────────────────┬─────────────────────────────┘
                           ▼
                  [PlanGeneratorAgent] (Zero-shot Creator)
                           │
                           ▼
              Tailored Long-Term Blueprint
                           │
┌──────────────────────────┴─────────────────────────────┐
│                     Daily Check-in                     │
└──────────────────────────┬─────────────────────────────┘
                           ▼
                  [AssessmentAgent] (ReAct Loop)
                           │
                           ├─► Tool: get_targets
                           ├─► Tool: get_meal_log
                           ├─► Tool: get_training_log (Strava)
                           ├─► Tool: analyze_meal_photo (Vision)
                           │
                           ▼ (Evaluates Gaps)
                           │
             ┌─────────────┴─────────────┐ (Parallel Hand-off)
             ▼                           ▼
     [MealPlannerAgent]          [WorkoutCoachAgent]
     (Deficit Analyzer)          (Recovery Advisor)
             │                           │
     ├─► Tool: suggest_meals     └─► Tool: suggest_workout
             │                           │
             └─────────────┬─────────────┘
                           ▼
               Unified Recovery Blueprint
  1. PlanGeneratorAgent (Zero-shot Blueprint Creator): Calculates scientific metabolic markers (Relative Fat Mass body fat estimation, Mifflin-St Jeor BMR, and TDEE) during onboarding, and generates a structured, multi-week fitness plan.
  2. AssessmentAgent (The Auditor - ReAct Loop): Operates as an advanced ReAct loop. It dynamically determines when and how to invoke tools (get_targets, get_meal_log, get_training_log, and analyze_meal_photo) depending on user inputs, compiling a daily performance score (0-100) and metric distribution.
  3. MealPlannerAgent (Catch-up Nutrition Expert): Consumes the macronutrient and caloric gaps generated by the AssessmentAgent. It executes the suggest_meals tool to recommend hyper-targeted recovery foods to close the athlete's deficit before they sleep.
  4. WorkoutCoachAgent (Adaptive Athletic Advisor): Consumes the overall health score and training load compiled by the AssessmentAgent. It executes the suggest_workout tool to dynamically recommend active recovery, mobility drills, or modified cardio based on today's strain.

🛠️ Technology Stack

  • Frontend & Backend Core: Nuxt 3 (Vue 3, Nitro, H3)
  • Styling & UI: TailwindCSS
  • AI SDK: @google/adk (Google Agent Development Kit) & @google/generative-ai
  • AI Engine: gemini-3.5-flash
  • Deployment & Hosting: Google Cloud Run (Continuous Source Deploy)
  • Third-Party Integration: Strava API v3

📦 Local Setup & Development

Prerequisites

  • Node.js (v18+)
  • pnpm (Recommended) or npm
  • A Google Gemini API Key (Get one at Google AI Studio)

Installation

  1. Clone the repository:
    git clone git@github.com:jaskanwal96/antigravity-coach.git
    cd google-hackathon
  2. Install dependencies:
    pnpm install
  3. Set up environment variables. Create a .env file in the root directory:
    GOOGLE_API_KEY="your_google_gemini_api_key"
    STRAVA_ACCESS_TOKEN="your_optional_strava_developer_token"

Running Locally

To launch the hot-reloading development server:

pnpm dev

Open http://localhost:3000 in your web browser.

Inspecting Agents (ADK DevTools)

To visual, chat with, and debug your agents interactively:

  1. Install the dev tools package:
    pnpm install -D @google/adk-devtools
  2. Run the local visual server:
    npx adk web
    Open http://localhost:8000 to access the complete developer trace dashboard.

☁️ Production Deployment (Google Cloud Run)

The project is configured for direct source-to-service deployments.

To build and deploy a new revision to your live Cloud Run service, ensure your gcloud CLI is authenticated and run:

# 1. Set your Gemini API key in your current terminal
export GOOGLE_API_KEY="your_key_here"

# 2. Trigger the deploy script
./deploy.sh

This will automatically bundle the workspace, upload it to Cloud Build, package it using Google Cloud Buildpacks, and deploy a new revision to your Cloud Run container instance.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages