File size: 3,167 Bytes
b51229c 071bb68 b51229c ffb3e34 b51229c 071bb68 b51229c 144b12e 071bb68 144b12e 071bb68 ee3673b a5b4ad1 ee3673b 071bb68 144b12e 071bb68 ee3673b 071bb68 ee3673b 071bb68 ee3673b 071bb68 ee3673b 071bb68 144b12e 071bb68 ee3673b 071bb68 ee3673b 071bb68 2f27beb 071bb68 ee3673b 071bb68 ee3673b 071bb68 144b12e 071bb68 4c77054 071bb68 ee3673b d1bd581 071bb68 ee3673b 071bb68 ee3673b 071bb68 ee3673b 6e41471 071bb68 ee3673b 071bb68 ee3673b b51229c ee3673b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
---
title: AI Python Tutor
emoji: π
colorFrom: pink
colorTo: indigo
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
short_description: AI Python Tutor
---
# π·οΈ Track Tag
mcp-in-action-track-consumer
# π AI-Python-Tutor
An **Autonomous Python Tutor** that teaches through hands-on code execution β writing Python files, running them, analyzing errors, and providing curated learning resources using MCP tools and autonomous reasoning.
> use openai/gpt-oss-120b for better results.
---
# π Project Overview
**AI-Python-Tutor ("Vibe Coding Academy")** is an **AI-powered educational agent** that uses MCP (Model Context Protocol) servers to deliver interactive coding lessons.
Unlike standard chatbots, this agent can:
* **Write real Python files** to a sandbox environment
* **Execute Python code** and show real output
* **Debug errors live** with explanations
* **Curate videos, articles, quizzes,** and documentation dynamically
* **Use LangGraph** for structured and modular lesson planning
It demonstrates the power of **MCP tools** (`write_file`, `run_python_script`) combined with autonomous reasoning to create a full teaching workflow.
---
# π― Key Features
* **Interactive Coding Lessons**
Ask the tutor to teach any topic (e.g., Decorators, Recursion), and it explains the concept using live code.
* **Live Code Execution**
The agent writes `.py` files and executes them using MCP tools, showing real output.
* **Learning Dashboard**
A dedicated panel showing:
* πΊ Recommended Videos
* π Articles & Documentation
* π§ Knowledge Check Quizzes
* **Focus Mode UI**
A βSlateβ themed distraction-free full-screen learning interface.
* **MCP Integration**
Modular architecture using `server.py` to handle safe file operations and code execution.
---
# π οΈ How to Use
1. **Open the HuggingFace Space**
2. **Ask a question** such as:
* "How do Python dictionaries work?"
* "Write a script for Fibonacci numbers."
3. **Watch the agent:**
* Explain the concept
* Write the Python file (e.g., `demo_dict.py`)
* Execute it and show the output
4. **Explore the Learning Dashboard** for videos, articles, and quizzes
5. **Use Focus Mode** to switch to a clean, immersive UI
---
# π₯ Demo Video
Watch the agent in action:[](https://youtu.be/9U3_gl9kLy8)
---
## π₯ Team
| Name | HuggingFace Username |
|------|--------------------|
| Ahmed Samir | @ABO4SAMRA |
| Omar Ahmed | @omarash2016 |
| Mohamed Ahmed | @Mohamed-Hosny |
> All members have joined the Hackathon organization and registered for the event.
---
## π± Social Media
Check our project post: https://www.linkedin.com/posts/omar-ahmed-5738ab332_hackathon-ai-python-activity-7400683397657899008-vp5h?utm_source=share&utm_medium=member_desktop&rcm=ACoAAFPIN2cB-lsuDIEpLKFLGfsM6T0lhAr8tl4
---
# βοΈ Requirements
* Gradio app with **MCP server support**
* `NEBIUS_API_KEY` environment variable for LLM inference (`openai/gpt-oss-20b`)
* **Python dependencies:** `gradio`, `langgraph`, `mcp`, `langchain_openai` |