An intelligent multi-agent system that provides personalized running training plans, session analysis, and coaching insights using AI agents, RAG knowledge base, and integration with Strava and Google Calendar.
- Multi-Agent Architecture: Orchestrator, Planner, Scheduler, Analyser, Strava, and RAG agents
- Personalized Training Plans: AI-generated training plans based on user goals and preferences
- Session Analysis: Detailed analysis of running sessions with coach feedback
- Strava Integration: Automatic activity tracking and completion detection
- Google Calendar Integration: Smart scheduling and rescheduling of training sessions
- RAG Knowledge Base: Research-based insights from uploaded training documents
- Dynamic Coach Feedback: Adaptive analysis based on available research knowledge
- Python 3.8+
- Node.js 16+
- Google Calendar API credentials
- Strava API credentials
# Create Python virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install Python dependencies
pip install -r requirements.txt# Run the Google Calendar setup script
python setup_calendar_auth.pyFollow the prompts to:
- Download credentials.json
- Complete OAuth flow
- Grant necessary permissions
# Run the Strava setup script
python setup_strava_auth.pyFollow the prompts to:
- Enter your Strava Client ID and Client Secret
- Complete OAuth flow
- Grant necessary permissions
# Initialize the RAG knowledge base
cd app
python -c "from ai_coach_agent.tools.rag_knowledge import initialize_rag_knowledge; initialize_rag_knowledge()"cd app
uvicorn main:app --reloadThe backend API will be available at http://localhost:8000
cd frontend
npm install
npm run devThe frontend will be available at http://localhost:3000
ai_coach_assistant/
βββ app/ # Backend Python application
β βββ ai_coach_agent/ # AI agents and workflows
β β βββ agent.py # Main agent definitions
β β βββ tools/ # Agent tools and utilities
β βββ db/ # Database services
β βββ data/ # ChromaDB data storage
β βββ main.py # FastAPI application
βββ frontend/ # Next.js React frontend
β βββ src/app/ # React components
β βββ public/ # Static assets
βββ requirements.txt # Python dependencies
βββ README.md # This file
- Coordinates all other agents
- Manages workflow execution
- Handles user requests and routing
- Creates personalized training plans
- Uses RAG knowledge for evidence-based planning
- Integrates user preferences and goals
- Manages Google Calendar integration
- Handles session scheduling and rescheduling
- Provides weather-aware scheduling
- Analyzes running sessions
- Generates dynamic coach feedback
- Uses RAG knowledge for research-based insights
- Integrates with Strava API
- Tracks activity completion
- Retrieves detailed activity data
- Processes research documents
- Creates knowledge chunks
- Enhances agent capabilities
Create a .env file in the app/ directory:
# API Keys
STRAVA_CLIENT_ID=your_strava_client_id
STRAVA_CLIENT_SECRET=your_strava_client_secret
GOOGLE_CALENDAR_CREDENTIALS_PATH=credentials.json
# AI Model Configuration
MISTRAL_API_KEY=your_mistral_api_key
GEMINI_API_KEY=your_gemini_api_key
# Database
CHROMA_DB_PATH=./data/chroma-
Google Calendar API:
- Go to Google Cloud Console
- Enable Calendar API
- Create credentials (OAuth 2.0)
- Download credentials.json
-
Strava API:
- Go to Strava API
- Create a new application
- Get Client ID and Client Secret
- Navigate to the frontend at
http://localhost:3000 - Use the "Create Training Plan" feature
- Provide your running goals, preferences, and target race date
- The system will generate a personalized training plan
- After completing a run, go to the "Insights" section
- Provide your RPE (Rate of Perceived Effort) and feedback
- The system will analyze your session and provide coach feedback
- Upload research documents (PDFs) to enhance the knowledge base
- The RAG agent will process and create knowledge chunks
- This knowledge will enhance future training plans and analysis
- Define the agent in
app/ai_coach_agent/agent.py - Add necessary tools in
app/ai_coach_agent/tools/ - Update the orchestrator to include the new agent
- Add new documents to the
app/uploads/directory - Use the RAG agent to process documents
- Knowledge will be automatically integrated into agent workflows
- Backend logs: Check terminal running
uvicorn main:app --reload - Frontend logs: Check terminal running
npm run dev - Agent logs: Available in the application interface
This project is part of CS550 coursework and is for educational purposes.
https://github.com/bhancockio/adk-voice-agent/blob/main/README.md