Spaces:
Sleeping
A newer version of the Gradio SDK is available: 6.13.0
title: SkillSprout - MCP Hackathon 2025
emoji: π
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.36.1
app_file: space_app.py
pinned: false
license: mit
tags:
- mcp-server-track
- agent-demo-track
- agents
- education
- microlearning
- azure-openai
- model-context-protocol
short_description: AI-powered microlearning platform with MCP
π± SkillSprout
Tracks: Track 1 (MCP Server/Tool) + Track 3 (Agentic Demo)
An AI-powered microlearning platform that leverages Azure OpenAI, Gradio, and Model Context Protocol (MCP) to deliver personalized bite-sized lessons and adaptive quizzes.
π Submitted for the Gradio Agents & MCP Hackathon 2025 π
π¬ Demo Video
MCP Server in Action:
π₯ Watch the Demo:
- YouTube Link: https://youtu.be/welG19Z8xxE?si=1fivrgf52ybd239p
- Full Screen: Click the fullscreen button for better viewing experience
- Quality: Set to HD for best quality
The video demonstrates the MCP server endpoints being used by various MCP clients, showcasing the seamless integration between the Gradio interface and Model Context Protocol functionality.
π Hackathon Highlights
This submission demonstrates several key innovations for the Gradio Agents & MCP Hackathon 2025, qualifying for both Track 1 and Track 3:
π§ Track 1: MCP Server/Tool
- β Dual-Purpose Application: Single app serving both Gradio interface AND MCP server
- β Full MCP Protocol Implementation: Complete endpoints for lesson generation, progress tracking, and quiz submission
- β External Agent Integration: Ready for use by Claude Desktop, Cursor, or any MCP client
- β Gradio-MCP Bridge: Demonstrates how any Gradio app can also function as an MCP server
π€ Track 3: Agentic Demo Showcase
- β Multi-Agent Architecture: Specialized AI agents (Lesson, Quiz, Progress, Orchestrator) working in harmony
- β Intelligent Coordination: Seamless agent interactions for personalized learning experiences
- β Adaptive Behavior: AI agents that learn from user interactions and adjust accordingly
- β Real-world Application: Production-ready agentic system for education and microlearning
π― Dual Track Innovation
Why SkillSprout qualifies for both tracks:
Track 1 Compliance:
- β Gradio app that functions as a complete MCP server
- β
All required MCP endpoints implemented (
/mcp/skills,/mcp/lesson/generate,/mcp/progress/{user_id},/mcp/quiz/submit) - β Demonstrates MCP client integration capabilities
- β Tagged with "mcp-server-track" as required
Track 3 Compliance:
- β Showcases powerful AI agents working together (Lesson Agent, Quiz Agent, Progress Agent, Orchestrator)
- β Demonstrates real-world agentic application for education
- β Shows creative use of AI agents for personalized learning
- β Tagged with "agent-demo-track" as required
π§ Agentic Architecture Innovation
- π Lesson Agent: AI-powered content generation with Azure OpenAI
- π§ͺ Quiz Agent: Adaptive quiz creation based on lesson content and user performance
- π Progress Agent: Smart difficulty adjustment and learning recommendations
- π― Orchestrator: Seamless coordination between all agents and user interactions
π MCP Endpoints Showcase
GET /mcp/skills- Discover available learning skillsPOST /mcp/lesson/generate- Generate personalized micro-lessonsGET /mcp/progress/{user_id}- Access detailed learning analyticsPOST /mcp/quiz/submit- Submit and score quiz attempts
π‘ Unique Features
- Microlearning Focus: 3-5 minute bite-sized lessons perfect for busy learners
- Adaptive Difficulty: AI automatically adjusts based on quiz performance
- Any Skill Learning: Works for both predefined and custom skills
- Real-time Analytics: Live progress tracking and personalized recommendations
π’ Enterprise Meets Open Source: Why Azure OpenAI?
SkillSprout strategically leverages Azure OpenAI to bridge the gap between enterprise-grade reliability and open source innovation:
π‘οΈ Enterprise-Grade Foundation
- π Content Safety: Built-in content filtering and safety guardrails for educational content
- π Observability: Comprehensive monitoring, logging, and analytics for production workloads
- π Security & Compliance: Enterprise-level data protection and regulatory compliance (SOC 2, GDPR, HIPAA)
- β‘ Performance: Guaranteed SLAs, low latency, and scalable infrastructure
- π Global Availability: Multi-region deployment options for worldwide accessibility
π Open Source Innovation
- π Model Context Protocol: Embracing open standards for agent interoperability
- π Open Architecture: Modular design that works with any MCP-compatible client
- π¨ Gradio Integration: Leveraging open source UI frameworks for rapid prototyping
- π οΈ Extensible Design: Easy to adapt, modify, and extend for different use cases
- π€ Community-Driven: Contributing to the broader AI education ecosystem
π‘ Best of Both Worlds
By choosing Azure OpenAI, SkillSprout delivers:
- Production-Ready: Enterprise controls meet innovative open source capabilities
- Developer-Friendly: Modern APIs with robust documentation and community support
- Future-Proof: Access to latest models while maintaining stability and governance
- Educational Focus: Content safety ensures appropriate learning materials for all audiences
This combination enables educational institutions, enterprises, and individual developers to confidently deploy AI-powered learning solutions at scale.
β¨ Features
- π― Skill Selection: Choose from predefined skills or enter custom topics
- π AI-Generated Micro-Lessons: Concise, focused lessons (3-5 minutes)
- π§ Adaptive Quizzes: Smart quizzes that adjust difficulty based on performance
- π Progress Tracking: Visual progress monitoring and analytics
- π€ Agentic Architecture: Multiple specialized AI agents working together
- π MCP Integration: Model Context Protocol endpoints for external integration
- π¨ Modern UI: Clean, responsive Gradio interface
- π§ Voice Narration: AI-powered audio narration with Azure Speech Services
- π Gamification System: Achievements, points, levels, and progress rewards
- π Enhanced Learning Experience: Multi-modal learning with audio and visual feedback
π§ Voice Narration System
SkillSprout includes an advanced AI-powered voice narration system that transforms text-based lessons into engaging audio experiences:
π€ Azure Speech Services Integration
- High-Quality Voices: Powered by Azure Cognitive Services Speech SDK
- Multi-language Support: Neural voices supporting various languages and accents
- Customizable Voice Selection: Choose from different voice personalities
- Natural Speech Synthesis: Advanced SSML support for natural-sounding narration
π΅ Voice Features
- Lesson Narration: Convert any lesson content to professional audio
- Adaptive Pacing: Intelligent speech timing for optimal learning
- Audio Export: Download narration files for offline learning
- Accessibility Support: Screen reader compatibility and audio-first learning
π§ Voice Configuration
# Azure Speech Services Configuration (Optional)
AZURE_SPEECH_KEY="your-speech-api-key"
AZURE_SPEECH_REGION="eastus2"
AZURE_SPEECH_VOICE="en-US-AvaMultilingualNeural"
π Gamification & Achievement System
SkillSprout incorporates a comprehensive gamification system to motivate learners and track progress:
π― Achievement Categories
- π― First Steps: Complete your first lesson
- π§ Quiz Master: Score 100% on a quiz
- πͺ Persistent Learner: Complete 5 lessons
- π Scholar: Complete 10 lessons
- β Domain Expert: Master a skill (20 lessons)
- π Polyglot: Learn 3 different skills
- π― Perfectionist: Score 100% on 5 quizzes
- β‘ Speed Learner: Complete lesson in under 3 minutes
- π Consistent: Learn for 7 days in a row
- π§ Explorer: Try voice narration feature
π Progress Metrics
- Points System: Earn points for lessons, quizzes, and achievements
- Level Progression: Automatic level advancement based on activity
- Mastery Tracking: Skill-specific mastery percentage calculation
- Streak Counters: Daily learning streak tracking
- Performance Analytics: Detailed learning pattern insights
π Enhanced User Experience
- Real-time Notifications: Instant achievement unlocks and progress updates
- Visual Progress Indicators: Progress bars, badges, and completion metrics
- Personalized Recommendations: AI-driven next steps based on progress patterns
- Social Features: Achievement sharing and progress visibility (optional)
ποΈ Architecture
Multi-Agent System Design
The application implements a sophisticated agentic architecture where specialized AI agents collaborate to deliver personalized learning experiences:
π§ Core Agents
π Lesson Agent (
LessonAgentclass)- Purpose: Generates personalized micro-lessons (3-5 minutes)
- AI Integration: Uses Azure OpenAI GPT-4.1 for content creation
- Adaptive Logic: Adjusts content based on user difficulty level and learning history
- Output: Structured lessons with key concepts, examples, and practice exercises
π§ͺ Quiz Agent (
QuizAgentclass)- Purpose: Creates adaptive quizzes based on lesson content
- Smart Features: Adjusts question difficulty based on user performance
- Question Types: Multiple choice, true/false, and open-ended questions
- Scoring: Intelligent evaluation with detailed explanations
π Progress Agent (
ProgressAgentclass)- Purpose: Tracks learning progress and provides personalized recommendations
- Analytics: Monitors completion rates, quiz scores, and learning patterns
- Adaptive Difficulty: Automatically adjusts lesson difficulty based on performance
- Recommendations: Suggests next learning steps and skill improvements
π― Orchestrator (
AgenticSkillBuilderclass)- Purpose: Coordinates all agent interactions and user workflow
- Session Management: Handles user state and learning sessions
- Error Handling: Robust fallback mechanisms for AI service failures
- Integration: Bridges Gradio interface with MCP server endpoints
π File Structure
space_app.py- Primary entry point for Hugging Face Spaces- Unified Gradio interface + MCP server
- FastAPI integration for MCP endpoints
- Environment variable handling
app.py- Core business logic and agent classes- All agent implementations
- Data models (
UserProgress,Lesson,Quiz) - Orchestration logic
run.py- Local development launcher- Multi-service startup options
- Development utilities
π Agent Workflow
sequenceDiagram
participant U as User Interface
participant O as Orchestrator
participant LA as Lesson Agent
participant PA as Progress Agent
participant QA as Quiz Agent
participant AI as Azure OpenAI
participant MCP as MCP Endpoints
U->>O: Learning Request
O->>PA: Check User Progress
PA->>O: Current Level & Analytics
O->>LA: Generate Lesson Request
LA->>AI: Content Generation
AI->>LA: Personalized Content
LA->>O: Structured Lesson
O->>U: Display Lesson
U->>O: Take Quiz Request
O->>QA: Create Adaptive Quiz
QA->>AI: Generate Questions
AI->>QA: Quiz Content
QA->>O: Structured Quiz
O->>U: Display Quiz
U->>O: Submit Quiz Answers
O->>QA: Score Submission
QA->>PA: Update Progress
PA->>O: Next Recommendations
O->>U: Results & Next Steps
Note over MCP: External tools can access<br/>same functionality via<br/>MCP endpoints
MCP-->>O: External Agent Request
O-->>MCP: Unified Response
This architecture ensures scalability, modularity, and seamless integration with external learning environments through the Model Context Protocol.
π Quick Start
Prerequisites
- Python 3.10.16 installed
- Azure OpenAI subscription with API key
- Access to GPT-4 model deployment
Installation
Clone and navigate to the project:
cd c:\Users\shyamsridhar\code\hf-hackathonCreate and activate a virtual environment:
python -m venv .venv .venv\Scripts\Activate(On macOS/Linux, use
source .venv/bin/activate)Install dependencies:
pip install -r requirements.txtConfigure environment variables:
- Your
.envfile is already configured with Azure OpenAI credentials - Verify the credentials are correct and models are deployed
- Your
Run the application:
python run.pyChoose from three options:
- Option 1: Gradio App only (recommended for demo)
- Option 2: MCP Server only
- Option 3: Both services
π― Usage
Learning Flow
- Select a Skill: Choose from predefined skills or enter a custom topic
- Read the Lesson: Engage with AI-generated micro-content
- Take the Quiz: Test your understanding with adaptive questions
- View Results: Get detailed feedback and progress updates
- Continue Learning: Follow AI recommendations for next steps
Available Skills
- Python Programming
- Spanish Language
- Public Speaking
- Data Science
- Machine Learning
- JavaScript
- Project Management
- Digital Marketing
- Creative Writing
- Photography
Plus any custom skill you can imagine!
π MCP Endpoints
The application exposes Model Context Protocol endpoints for seamless integration with external tools and agents. These endpoints enable other applications to leverage our agentic learning system:
π Available Endpoints
| Endpoint | Method | Description | Use Case |
|---|---|---|---|
/ |
GET | Server info & hackathon details | Health check & discovery |
/mcp/skills |
GET | List available predefined skills | Skill discovery for external agents |
/mcp/lesson/generate |
POST | Generate personalized lesson | Create content for learning platforms |
/mcp/progress/{user_id} |
GET | Get user learning analytics | Progress tracking in external systems |
/mcp/quiz/submit |
POST | Submit quiz answers | Assessment integration |
π Request/Response Examples
Generate Lesson
POST /mcp/lesson/generate
{
"skill": "Python Programming",
"user_id": "learner_123",
"difficulty": "beginner"
}
Get Progress
GET /mcp/progress/learner_123?skill=Python Programming
π§ Integration Examples
- Claude Desktop: Use our MCP endpoints as a learning assistant
- Cursor IDE: Integrate personalized tutorials into development workflow
- Learning Management Systems: Embed our AI-generated content
- Educational Dashboards: Pull progress analytics for reporting
π API Documentation
- Local Development: Visit
http://localhost:8001/docsfor interactive API docs - Hugging Face Spaces: Visit your deployed space URL +
/docs
π§ͺ Testing MCP Integration
# Test lesson generation
curl -X POST "https://your-space.hf.space/mcp/lesson/generate" \
-H "Content-Type: application/json" \
-d '{"skill": "Python Programming", "user_id": "test_user"}'
# Get user progress
curl "https://your-space.hf.space/mcp/progress/test_user?skill=Python%20Programming"
π Progress Dashboard
Track your learning journey with enhanced analytics and gamification:
π Learning Analytics
- Lessons Completed: Number of lessons finished per skill
- Quiz Performance: Average scores and improvement trends
- Difficulty Progression: Automatic difficulty adjustment tracking
- Learning Streaks: Consistent learning habit monitoring
- AI Recommendations: Personalized next steps and skill suggestions
π Gamification Tracking
- Achievement Progress: Real-time achievement unlocking and badges
- Points & Levels: Experience points system with automatic level progression
- Skill Mastery: Detailed mastery percentage for each skill area
- Performance Insights: Learning velocity, accuracy trends, and engagement metrics
- Goal Setting: Personalized learning targets and milestone tracking
π§ Voice Learning Analytics
- Audio Engagement: Voice narration usage patterns and preferences
- Multi-modal Learning: Balance between text and audio learning sessions
- Accessibility Metrics: Audio-first learning progress and completion rates
π§ Configuration
Environment Variables
The .env file contains your Azure OpenAI configuration:
# Azure OpenAI Configuration
AZURE_OPENAI_ENDPOINT="your-endpoint"
AZURE_OPENAI_KEY="your-api-key"
AZURE_OPENAI_API_VERSION="2024-12-01-preview"
AZURE_OPENAI_LLM_DEPLOYMENT="gpt-4.1"
AZURE_OPENAI_LLM_MODEL="gpt-4.1"
# Azure Speech Services (Optional - for voice narration)
AZURE_SPEECH_KEY="your-speech-api-key"
AZURE_SPEECH_REGION="eastus2"
AZURE_SPEECH_VOICE="en-US-AvaMultilingualNeural"
Optional Settings
You can add these optional environment variables:
DEBUG=false
LOG_LEVEL=INFO
GRADIO_PORT=7860
MCP_PORT=8000
MAX_QUIZ_QUESTIONS=5
DEFAULT_LESSON_DURATION=5
π§ͺ Development
Running in Development Mode
# Install development dependencies
pip install -r requirements.txt
# Run with auto-reload
python app.py
Testing MCP Endpoints
# Test lesson generation
curl -X POST "http://localhost:8000/lesson/generate" \
-H "Content-Type: application/json" \
-d '{"skill": "Python Programming", "user_id": "test_user"}'
# Get user progress
curl "http://localhost:8000/progress/test_user?skill=Python%20Programming"
π± Deployment
Local Deployment
python run.py
Hugging Face Spaces
- Create a new Space on Hugging Face
- Upload your code
- Set environment variables in Space settings
- The app will auto-deploy
Azure App Service
- Create an Azure App Service
- Deploy using Git or ZIP
- Configure environment variables
- Set startup command:
python app.py
π Troubleshooting
Common Issues
Azure OpenAI Connection Error
- Verify your endpoint URL and API key
- Check if your model deployment is active
- Ensure you have sufficient quota
Module Import Errors
- Activate your virtual environment
- Install requirements:
pip install -r requirements.txt
Port Already in Use
- Change ports in environment variables
- Kill existing processes:
netstat -ano | findstr :7860
Logs
Check application logs in skillsprout.log for detailed error information.
π License
This project is part of a hackathon submission.
π Hackathon Features
This implementation demonstrates:
- β Agentic Workflows: Multiple AI agents collaborating
- β Azure OpenAI Integration: Modern SDK usage with best practices
- β Adaptive Learning: Smart difficulty adjustment
- β Modern UI: Gradio-based responsive interface
- β MCP Protocol: External agent integration capability
- β Progress Analytics: Comprehensive learning tracking
- β Error Handling: Robust error management and fallbacks
- β Voice Narration: AI-powered audio synthesis with Azure Speech Services
- β Gamification System: Achievements, points, levels, and user engagement
- β Multi-modal Learning: Text, audio, and interactive experiences
- β Enhanced UX: Real-time feedback, progress visualization, and personalized recommendations
Happy Learning! π