AlexFocus commited on
Commit
cab2472
·
1 Parent(s): e468c5f

readme updated

Browse files
Files changed (1) hide show
  1. README.md +210 -120
README.md CHANGED
@@ -9,7 +9,7 @@ python_version: 3.13
9
  app_file: app.py
10
  pinned: true
11
  license: mit
12
- short_description: Interactive educational tutor for primary education.
13
  thumbnail: https://huggingface.co/spaces/Agents-MCP-Hackathon/consilium_mcp/blob/main/assets/logo_learnbee.png
14
  tags:
15
  - building-mcp-track-creative
@@ -18,190 +18,280 @@ tags:
18
  - mcp-in-action-track-creative
19
  - education
20
  - early-childhood
 
 
21
  ---
22
 
23
  <!-- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference -->
24
 
 
25
 
26
- # Learnbee-mcp 🎓
27
 
28
- ## Website
29
- access the live demo here:
30
- [Learnbee-mcp on Hugging Face Spaces](https://huggingface.co/spaces/MCP-1st-Birthday/learnbee_mcp)
31
 
32
- ## What is this?
33
 
34
- **Learnbee-mcp** is an interactive educational system designed for children in early childhood education (ages 3-12). It uses the Model Context Protocol (MCP) to provide educational conversations and interactive activities based on lesson content.
35
 
36
- The system allows children to interact with friendly educational tutors who guide learning through questions, hints, and age-appropriate explanations, rather than giving direct answers. This encourages curiosity, critical thinking, and active participation in the learning process.
37
 
38
- <img src="assets/logo_learnbee.png" alt="LearnBee logo" width="150" />
39
 
 
40
 
 
41
 
 
 
 
 
42
 
43
- ### Key Features
44
 
45
- - 🎯 **Customizable Educational Tutors**: Choose from different tutors with friendly personalities (Professor Owl, Star Explorer, Logic Bot, Nature Guide, Story Friend)
46
- - 📚 **Customizable Lessons**: Load educational content from text files in the `./lessons` directory
47
- - 🎚️ **Difficulty Levels**: Adjust the difficulty level (beginner, intermediate, advanced) according to the child's needs
48
- - 🌍 **Multilingual**: Automatic language detection - the tutor responds in the same language the child uses
49
- - 🧠 **Key Concept Extraction**: The system automatically identifies key educational concepts from each lesson
50
- - 🛡️ **Child-Safe**: Built-in safety filters to keep conversations age-appropriate
51
 
52
- ### Demo
 
 
 
53
 
54
- <p align="center">
55
- <img src="./assets/screenshot.png" alt="Screenshot" height="200"/><br>
56
- <span>Interactive educational interface</span>
57
- </p>
58
 
59
- ## How to Use
60
 
61
- 1. **Select a Lesson**: Choose a lesson from the dropdown menu (lessons are loaded from `.txt` files in the `./lessons` directory)
62
- 2. **Choose a Tutor**: Select one of the available educational tutors
63
- 3. **Adjust Difficulty Level**: Select the appropriate level for the child
64
- 4. **Load the Lesson**: Click "Load Lesson & Prepare Tutor" to load the content and extract key concepts
65
- 5. **Start Learning!**: Begin a conversation with the tutor about the lesson content
66
 
67
- ### Tips
68
 
69
- - The tutor will not give direct answers, but will ask follow-up questions and offer hints to encourage thinking
70
- - If the child deviates from the topic, the tutor will gently redirect the conversation back to the lesson
71
- - The tutor automatically detects and responds in the same language the child uses - just start chatting in your preferred language!
 
 
72
 
73
- ## Development
 
 
 
 
74
 
75
- If you want to develop this project, here are the details to get you started.
76
 
77
- ### Prerequisites
78
 
79
- - **Python 3.12+**
80
- - **Gradio**: Provides the user interface for educational conversations
81
- - **OpenAI API**: Used to generate tutor responses and extract key concepts
82
- - This project uses [uv](https://github.com/astral-sh/uv) for dependency management. Please install uv if you haven't already.
83
 
84
- ### Installation
 
 
 
85
 
86
- After cloning the repository, you can run the following command to install dependencies:
87
 
88
- ```sh
89
- uv sync --frozen
90
- ```
91
 
92
- Or using pip:
93
 
94
- ```sh
95
- pip install -r requirements.txt
96
- ```
97
 
98
- ### Configuration
99
 
100
- 1. **Set up environment variables**:
101
- - Copy the `.env.example` file to `.env`:
102
- ```sh
103
- cp .env.example .env
104
- ```
105
- - Edit the `.env` file and add your OpenAI API key:
106
- ```
107
- OPENAI_API_KEY=your_api_key_here
108
- ```
109
 
110
- 2. **Prepare lessons**:
111
- - Create text files (`.txt`) in the `./lessons` directory with educational content
112
- - Each file should contain the lesson content in plain text
113
- - The system will automatically extract key concepts from each lesson
114
 
115
- ### Run Locally
 
 
 
 
116
 
117
- ```sh
118
- uv run gradio app.py
119
- ```
120
 
121
- Or using python directly:
122
 
123
- ```sh
124
- python app.py
125
- ```
 
 
 
126
 
127
- - Hot reloading is enabled by default.
128
 
129
- ### Project Structure
 
 
 
 
 
 
 
130
 
131
  ```
132
- learnbee-mcp/
133
- ├── app.py # Main Gradio application
134
- ├── requirements.txt # Project dependencies
135
- ├── .env # Environment variables (not committed to repository)
136
- ├── .env.example # Environment variables template
137
- ├── lessons/ # Directory with lesson files (.txt)
138
- │ ├── example_colors.txt # Colors lesson
139
- │ ├── numbers_1_to_10.txt # Numbers lesson
140
- │ ├── shapes.txt # Shapes lesson
141
- │ ├── animals.txt # Animals lesson
142
- │ └── weather_and_seasons.txt # Weather and seasons lesson
143
- └── src/
144
- └── learnbee/ # Main module
145
- ├── __init__.py
146
- ├── llm_call.py # LLM client with OpenAI API
147
- ├── mcp_server.py # MCP server for managing lessons
148
- └── mcp_client.py # MCP client (optional)
149
  ```
150
 
151
- ### Deploy to Hugging Face Spaces
 
 
152
 
153
- 1. Make sure all dependencies are in `requirements.txt`
154
- 2. Set up the `OPENAI_API_KEY` environment variable in Hugging Face Spaces settings
155
- 3. Push the code to the repository
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
- ```sh
158
- git add .
159
- git commit -m "Deploy Learnbee-mcp"
160
- git push
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  ```
162
 
163
- ## Customization
 
 
 
 
164
 
165
- ### Adding New Tutors
166
 
167
- You can add new tutors by editing the `TUTOR_NAMES` list in `app.py`:
 
 
 
 
 
 
 
 
168
 
169
  ```python
170
- TUTOR_NAMES = ["Professor Owl", "Star Explorer", "Logic Bot", "Nature Guide", "Story Friend", "Your New Tutor"]
 
 
 
171
  ```
172
 
173
- ### Creating New Lessons
174
 
175
- 1. Create a text file in the `./lessons` directory
176
- 2. Write educational content appropriate for ages 3-6
177
- 3. The system will automatically detect and load the new lesson
178
 
179
- ### Adjusting Tutor Behavior
 
 
 
180
 
181
- You can modify the `system_prompt` in the `custom_respond` function in `app.py` to adjust the tutor's pedagogical behavior.
 
 
 
182
 
183
- ## Technologies Used
 
 
 
 
184
 
185
- - **Gradio**: Framework for interactive user interfaces
186
- - **OpenAI API**: Language model for generating educational responses
187
- - **Model Context Protocol (MCP)**: Protocol for managing lesson context
188
- - **Python 3.12+**: Main programming language
 
189
 
190
- ## License
191
 
192
- MIT License
 
 
 
 
 
 
 
 
 
193
 
194
- ## Contributing
195
 
196
- Contributions are welcome. Please open an issue or pull request if you have suggestions or improvements.
 
 
 
 
 
197
 
198
  ---
199
 
200
- **Learnbee-mcp** - Making learning interactive and fun for the little ones 🎓✨
 
 
201
 
 
202
 
203
- ### 📬 Contact info
 
 
 
204
 
205
- * GitHub: @alexFocus92
206
- * Hugging Face: @AlexFocus
207
- * X: @alexFocus8
 
 
 
9
  app_file: app.py
10
  pinned: true
11
  license: mit
12
+ short_description: AI-powered adaptive learning platform with real-time personalization and gamification for children ages 3-12
13
  thumbnail: https://huggingface.co/spaces/Agents-MCP-Hackathon/consilium_mcp/blob/main/assets/logo_learnbee.png
14
  tags:
15
  - building-mcp-track-creative
 
18
  - mcp-in-action-track-creative
19
  - education
20
  - early-childhood
21
+ - adaptive-learning
22
+ - gamification
23
  ---
24
 
25
  <!-- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference -->
26
 
27
+ # 🎓 LearnBee MCP: The Future of Adaptive Early Childhood Education
28
 
29
+ > **Transform learning into an adventure with AI-powered personalization that adapts to every child, in real-time.**
30
 
31
+ ## 🚀 Live Demo
32
+ Experience LearnBee MCP now: [**Launch Interactive Demo**](https://huggingface.co/spaces/MCP-1st-Birthday/learnbee_mcp)
 
33
 
34
+ <img src="assets/logo_learnbee.png" alt="LearnBee logo" width="150" />
35
 
36
+ ---
37
 
38
+ ## 💡 Why LearnBee MCP Changes Everything
39
 
40
+ Traditional educational tools treat all children the same. **LearnBee MCP doesn't.**
41
 
42
+ We've built the world's first **ultra-adaptive educational platform** that learns from every interaction, adjusts difficulty in real-time, and gamifies progress—all while keeping children engaged through interactive adventures with their favorite characters.
43
 
44
+ ### 🎯 The Problem We Solve
45
 
46
+ - **One-size-fits-all education** fails to engage diverse learners
47
+ - **Static content** becomes boring quickly
48
+ - **No feedback loop** means children don't see their progress
49
+ - **Language barriers** limit accessibility
50
 
51
+ ### Our Solution: Intelligent Adaptive Learning
52
 
53
+ LearnBee MCP uses advanced AI to create a **personalized learning journey** for every child:
 
 
 
 
 
54
 
55
+ 1. **Real-Time Adaptation**: The system analyzes each response and adjusts teaching style instantly
56
+ 2. **Engagement-Driven Gamification**: Visual progress tracking with stars, badges, and milestones
57
+ 3. **Natural Conversations**: No more rigid Q&A—children explore through story-like adventures
58
+ 4. **Universal Access**: Automatic language detection supports learning in any language
59
 
60
+ ---
 
 
 
61
 
62
+ ## 🌟 Revolutionary Features
63
 
64
+ ### 🧠 Ultra-Adaptive Personalization Engine
 
 
 
 
65
 
66
+ **The AI tutor that truly understands your child.**
67
 
68
+ Our proprietary adaptation system analyzes:
69
+ - **Response patterns**: Short vs. detailed answers
70
+ - **Engagement signals**: Emojis, exclamations, questions
71
+ - **Success rate**: Correct vs. incorrect answers
72
+ - **Learning pace**: Speed of comprehension
73
 
74
+ **Then automatically:**
75
+ - ✅ Simplifies language if the child is struggling
76
+ - ✅ Increases challenge if they're excelling
77
+ - ✅ Boosts excitement if engagement drops
78
+ - ✅ Matches energy when curiosity peaks
79
 
80
+ **Result**: Every child gets a perfectly tailored learning experience that evolves with them.
81
 
82
+ ### 🎮 Session-Based Gamification System
83
 
84
+ **Turn learning into an adventure they can't wait to continue.**
 
 
 
85
 
86
+ - **⭐ Star Rewards**: Earn stars for engagement, correct answers, and great questions
87
+ - **🏆 Achievement Badges**: Unlock milestones (First Steps, Explorer, Problem Solver, Star Student, Creative Thinker, Adventure Master)
88
+ - **📊 Visual Progress**: Real-time progress bar showing adventure completion
89
+ - **🎯 Clear Goals**: Next milestone always visible to motivate continued learning
90
 
91
+ **Privacy-First Design**: Progress resets each session—perfect for classrooms and shared devices. No persistent data, no profiles, no tracking.
92
 
93
+ ### 🎭 Interactive Adventure Learning
 
 
94
 
95
+ **Forget boring lessons. Welcome to immersive educational adventures.**
96
 
97
+ Instead of "Today we'll learn about Mars," children hear:
 
 
98
 
99
+ > *"Hello! 👋 I'm Buzz Lightyear! Today we're blasting off on an amazing space mission to Mars! Your job is to be the captain of our spaceship and help us navigate through asteroid fields and land safely on the Red Planet. So, are you ready to start the countdown for launch? 🚀"*
100
 
101
+ **5 Engaging Adventures** (not lessons):
102
+ - 🚀 **Space Mission: Destination Mars** - Navigate asteroids, count down launches, explore the Red Planet
103
+ - 🔍 **The Mystery of the Missing Cookies** - Solve crimes, interview suspects, learn conflict resolution
104
+ - 🌱 **The Magical Garden of Surprises** - Plant magical seeds, discover fantastical fruits, learn about growth
105
+ - 🌊 **Underwater Adventure: Ocean Guardians** - Pilot submarines, save sea life, clean the ocean
106
+ - 🦸 **Superhero School: Values Training** - Complete missions, unlock powers, learn kindness and honesty
 
 
 
107
 
108
+ ### 🎓 Character-Driven Learning
 
 
 
109
 
110
+ **10 Beloved Tutors** bring lessons to life:
111
+ - Mickey Mouse, Elsa, Buzz Lightyear (Disney favorites)
112
+ - Mario, Sonic, Pikachu (Gaming heroes)
113
+ - Einstein (Science genius)
114
+ - Curious Explorer, Magic Teacher, Adventure Buddy (Original characters)
115
 
116
+ Each tutor embodies their unique personality while maintaining educational excellence.
 
 
117
 
118
+ ### 🌍 True Multilingual Intelligence
119
 
120
+ **Not just translation—true language understanding.**
121
+
122
+ - Automatic detection of child's language
123
+ - Instant response in the same language
124
+ - Supports 15+ languages seamlessly
125
+ - No configuration needed—just start chatting
126
 
127
+ ### 🛡️ Built-In Safety & Age-Appropriateness
128
 
129
+ - Content filtered for ages 3-12
130
+ - Gentle redirection from inappropriate topics
131
+ - Problem-based learning (not just answers)
132
+ - Encourages critical thinking and curiosity
133
+
134
+ ---
135
+
136
+ ## 🎬 How It Works
137
 
138
  ```
139
+ 1. Child selects an adventure → "Space Mission Mars"
140
+ 2. Chooses their tutor → "Buzz Lightyear"
141
+ 3. Sets difficulty → "Beginner"
142
+ 4. Loads lesson System initializes adaptive AI
143
+
144
+ 5. Adventure begins with natural greeting and engaging question
145
+ 6. Child responds → AI analyzes engagement, awards stars
146
+ 7. Tutor adapts in real-time based on child's performance
147
+ 8. Progress displays in footer → Stars, badges, milestones update
148
+ 9. Learning continues with perfectly calibrated difficulty
149
+
150
+ Result: Engaged, motivated, learning child 🎉
 
 
 
 
 
151
  ```
152
 
153
+ ---
154
+
155
+ ## 📊 Technical Innovation
156
 
157
+ ### Powered by Model Context Protocol (MCP)
158
+
159
+ LearnBee MCP leverages the cutting-edge **Model Context Protocol** to:
160
+ - Manage lesson context dynamically
161
+ - Extract key educational concepts automatically
162
+ - Generate adaptive teaching strategies
163
+ - Create personalized learning paths
164
+
165
+ ### Architecture Highlights
166
+
167
+ - **Session State Management**: Tracks interactions, engagement, and performance
168
+ - **Gamification Engine**: Awards achievements and visualizes progress
169
+ - **Adaptive Prompt System**: Injects real-time context into AI responses
170
+ - **Natural Language Generation**: Creates conversational, story-like introductions
171
+
172
+ ### Tech Stack
173
+
174
+ - **Gradio**: Beautiful, responsive UI
175
+ - **OpenAI GPT-4**: Advanced language understanding
176
+ - **Model Context Protocol**: Intelligent context management
177
+ - **Python 3.13**: Modern, efficient backend
178
+
179
+ ---
180
 
181
+ ## 🚀 Quick Start
182
+
183
+ ### Prerequisites
184
+ - Python 3.12+
185
+ - OpenAI API key
186
+
187
+ ### Installation
188
+
189
+ ```bash
190
+ # Clone the repository
191
+ git clone https://github.com/yourusername/learnbee_mcp.git
192
+ cd learnbee_mcp
193
+
194
+ # Install dependencies
195
+ uv sync --frozen
196
+ # or
197
+ pip install -r requirements.txt
198
+
199
+ # Configure environment
200
+ cp .env.example .env
201
+ # Add your OPENAI_API_KEY to .env
202
+
203
+ # Launch
204
+ python app.py
205
  ```
206
 
207
+ Visit `http://localhost:7860` and start learning!
208
+
209
+ ---
210
+
211
+ ## 🎨 Customization
212
 
213
+ ### Create New Adventures
214
 
215
+ Use the built-in **"Create Lesson"** tab:
216
+ 1. Enter a topic (e.g., "Ancient Egypt", "Volcanoes")
217
+ 2. Select age range
218
+ 3. Click "Create with ChatGPT"
219
+ 4. Adventure generated automatically!
220
+
221
+ ### Add Custom Tutors
222
+
223
+ Edit `src/learnbee/constants.py`:
224
 
225
  ```python
226
+ TUTOR_NAMES = [
227
+ ("Your Character", "Description of teaching style"),
228
+ # ... existing tutors
229
+ ]
230
  ```
231
 
232
+ ---
233
 
234
+ ## 🏆 Why LearnBee MCP Wins
 
 
235
 
236
+ ### Innovation
237
+ ✅ **First** adaptive learning platform with real-time personalization
238
+ ✅ **First** to combine gamification with MCP technology
239
+ ✅ **First** to use adventure-based learning with AI tutors
240
 
241
+ ### Impact
242
+ ✅ Makes learning accessible to **all children**, regardless of language
243
+ ✅ Keeps children **engaged** through gamification and storytelling
244
+ ✅ **Adapts** to individual learning styles automatically
245
 
246
+ ### Technical Excellence
247
+ ✅ Clean, modular architecture
248
+ ✅ Privacy-first design (no persistent data)
249
+ ✅ Scalable and extensible
250
+ ✅ Production-ready code
251
 
252
+ ### User Experience
253
+ Beautiful, intuitive interface
254
+ Instant feedback and rewards
255
+ Natural, conversational interactions
256
+ ✅ Works on any device
257
 
258
+ ---
259
 
260
+ ## 📈 Future Roadmap
261
+
262
+ - 🎯 Voice interaction support
263
+ - 📱 Mobile app (iOS/Android)
264
+ - 👥 Multi-child profiles (optional)
265
+ - 📊 Parent/teacher dashboard
266
+ - 🎨 Custom avatar creation
267
+ - 🌐 Community lesson marketplace
268
+
269
+ ---
270
 
271
+ ## 📬 Contact & Contribute
272
 
273
+ **Creator**: Alex Focus
274
+ - GitHub: [@alexFocus92](https://github.com/alexFocus92)
275
+ - Hugging Face: [@AlexFocus](https://huggingface.co/AlexFocus)
276
+ - X: [@alexFocus8](https://twitter.com/alexFocus8)
277
+
278
+ **Contributions Welcome!** Open an issue or PR to help make learning better for children worldwide.
279
 
280
  ---
281
 
282
+ ## 📄 License
283
+
284
+ MIT License - Free to use, modify, and distribute.
285
 
286
+ ---
287
 
288
+ <p align="center">
289
+ <strong>🎓 LearnBee MCP - Where AI Meets Adventure in Education ✨</strong><br>
290
+ <em>Making every child's learning journey unique, engaging, and effective.</em>
291
+ </p>
292
 
293
+ <p align="center">
294
+ <a href="https://huggingface.co/spaces/MCP-1st-Birthday/learnbee_mcp">
295
+ <img src="https://img.shields.io/badge/Try%20Now-Live%20Demo-blue?style=for-the-badge" alt="Try Now"/>
296
+ </a>
297
+ </p>