AI Coach
Estudio Three’s AI Coach is your personal academic mentor—an intelligent assistant that understands your schedule, workload, and goals to provide contextual advice, study strategies, and motivational support.What It Does
The AI Coach uses a large language model (Groq’s Llama3) to have conversations with you about:- Daily and weekly planning
- Study strategies for specific subjects
- Motivation and mindset coaching
- Time management optimization
- Recovery and break recommendations
Contextual Awareness
Coach knows your tasks, grades, habits, schedule, and Pomodoro history
Natural Conversations
Chat naturally about any academic or productivity challenge
Quick Actions
Pre-built prompts for common needs (plan day, get motivated, etc.)
Personalized Advice
Recommendations tailored to your sport, subjects, and energy levels
Why It Matters
Student-athletes face unique challenges that generic productivity advice doesn’t address:- Balancing competing demands (training vs studying)
- Energy management across physical and mental tasks
- Variable schedules with competitions and travel
- Isolation from typical academic support systems
- Time constraints that make traditional tutoring difficult
- Being available 24/7 whenever you need guidance
- Understanding the student-athlete context specifically
- Providing instant feedback without judgment
- Learning from your actual patterns and preferences
- Offering strategies proven effective for your situation
How to Use It
Starting Your First Conversation
- Navigate to AI Coach page
- Choose a quick action button, or
- Type your question in the input field
- Click Send or press Enter
- Coach responds with personalized advice
- Continue the conversation as needed
Quick Action Prompts
Pre-built prompts for common needs:Plan Day
Get a structured plan for today based on your schedule and tasks
Plan Week
Receive strategic weekly planning advice with priority allocation
Motivate Me
Get motivational boost tailored to your current situation
Break Advice
Learn optimal break strategies based on your training load
Example Conversations
Daily Planning Example
Daily Planning Example
You: Plan my dayCoach: Hey! Let’s structure your day. I see you have Physics at 9am, training at 3pm, and 3 active tasks.Here’s my recommendation:
- 7:00-8:30am: Morning routine + breakfast
- 8:30-9:00am: Review Physics notes before class
- 9:00-12:00pm: Classes
- 12:00-1:00pm: Lunch + rest
- 1:00-2:45pm: Focus session - Math homework (2 Pomodoros)
- 3:00-5:00pm: Training
- 5:00-6:00pm: Recovery + dinner
- 6:00-7:30pm: Focus session - English essay (3 Pomodoros)
- 7:30-9:00pm: Review tomorrow’s materials
- 9:00-10:00pm: Wind down routine
Study Strategy Example
Study Strategy Example
You: I’m struggling with Physics. What should I do?Coach: I see Physics is rated as difficulty 10 and your current average is 72%. Let’s build a recovery plan:
- Identify weak areas: Review your recent test. Which concepts did you miss?
- Active recall: Don’t just re-read. Practice problems without notes first.
- Spaced repetition: Study Physics for 1 Pomodoro daily, not cramming.
- Office hours: Schedule time with your teacher this week.
- Study group: Find 2-3 classmates to work through problems together.
Motivation Example
Motivation Example
You: I’m exhausted and don’t want to studyCoach: I hear you. You completed training today and already did 2 Pomodoros this morning. That’s solid work!Remember why you’re doing this: [references your goals if set]. You’re not just a student or just an athlete—you’re proving you can do both.Here’s what I suggest:
- Take a real 20-minute break. No phone, just rest.
- Do ONE Pomodoro on your easiest task.
- Reassess. If still exhausted, it’s okay to stop.
Types of Questions to Ask
Planning Questions:- “How should I structure my week?”
- “What should I prioritize today?”
- “Help me plan for exam week”
- “I have a competition Saturday, how do I adjust?”
- “What’s the best way to study for [subject]?”
- “How can I improve my grade in [subject]?”
- “I have 3 exams next week, how do I prepare?”
- “What study method works for [topic]?”
- “I’m feeling overwhelmed”
- “How do I stay consistent?”
- “I missed my goals this week”
- “How do other student-athletes manage this?”
- “Should I study before or after training?”
- “How long should my breaks be?”
- “When is the best time to study [subject]?”
- “How do I recover faster between tasks?”
Technical Details
AI Architecture
The AI Coach uses a serverless architecture: Client → Vercel API Proxy → Groq API → Llama3 ModelAPI Endpoint
Location:api/ai.ts
The Vercel serverless function handles:
- CORS configuration for web app
- Rate limiting (30 requests per minute per IP)
- Request validation and sanitization
- Groq API communication
- Error handling and fallbacks
Context Building
Before sending to the LLM, the client builds rich context: Location:src/features/ai-coach/components/AICoachPage.tsx:31
System Prompt
The AI Coach uses a carefully crafted system prompt: Location:api/ai.ts:79
- Its role (student-athlete coach)
- User’s specific situation
- Current state (tasks, progress)
- Communication style (direct, motivating)
Model Selection
Using Groq’s Llama3-8B model:- Fast inference (< 1 second response time)
- Strong reasoning capabilities
- Cost-effective for high volume
- Supports multi-language responses
api/ai.ts:87):
State Management
Store:src/stores/useChatStore.ts
Components
AICoachPage (src/features/ai-coach/components/AICoachPage.tsx:16)
- Main chat interface
- Message history display
- Input field with send button
- Quick action buttons
- Loading states
- User messages: Right-aligned, primary color
- Assistant messages: Left-aligned, muted background
- Avatar icons distinguish speakers
- Rounded corners and smooth animations
Error Handling
Multiple layers of error handling:-
Client-side validation (
src/features/ai-coach/services/aiService.ts:27)- Checks for empty messages
- Validates context structure
- Handles network errors
-
API-level validation (
api/ai.ts:49)- Validates request body
- Checks message length (max 2000 chars)
- Enforces rate limits
-
Graceful degradation
- 429 (Too many requests): “You’ve sent too many messages…”
- 503 (Service unavailable): “AI service unavailable…”
- Network error: “Connection error. Check your internet.”
Security & Privacy
Rate Limiting
30 requests per minute per IP prevents abuse and controls costs
Input Sanitization
All user inputs sanitized before sending to AI to prevent injection
No Message Storage
Chat history not saved to database—privacy by default
CORS Protection
API endpoint restricted to app domain only
API Key Security
Groq API key stored as environment variable:- Never exposed to client
- Accessed only in serverless function
- Rotated periodically
- Monitored for usage patterns
Best Practices
Be Specific in Your Questions
Be Specific in Your Questions
Better: “I have a Physics exam Friday and I’m weak on thermodynamics. How should I study?”Worse: “Help me study”The more context you provide, the better the advice.
Use Quick Actions First
Use Quick Actions First
If you’re asking a common question (plan day, get motivated), use the quick action buttons. They’re optimized prompts that trigger specialized responses.
Keep Data Updated
Keep Data Updated
The AI Coach is only as good as your data. Keep tasks, grades, and habits current for best advice.
Treat It Like a Real Coach
Treat It Like a Real Coach
Have conversations, not just one-off questions. Follow up with “Why?” or “Can you elaborate?” to dig deeper.
Limitations
Current Limitations:
- Chat history not persisted (resets on page refresh)
- No long-term memory across sessions
- Cannot directly modify your schedule or create tasks
- Limited to text-based advice (no visual diagrams)
- Rate limited to prevent abuse (30 requests/minute)
- Persistent conversation history
- Proactive suggestions based on patterns
- Direct integration (“Schedule this for me”)
- Voice input/output support
- Multi-modal responses (charts, schedules)
Integration with Other Features
- Task Management: Coach sees active tasks and can suggest priorities
- Pomodoro Timer: Uses today’s focus time in recommendations
- Academic Tracking: Knows your grades and can suggest study focus
- Habits & Goals: References your goals for motivational context
- Smart Routines: Understands your schedule and energy patterns
- Calendar: Aware of upcoming events and deadlines
Language Support
The AI Coach responds in your configured language:- English
- Spanish (default)
- Portuguese
- French
Next Steps: Explore the complete Core Features overview to see how all features work together, or dive into Getting Started to begin your journey.