EduAgent — AI-Powered Study Companion for Students


🏷️ Tagline

"Enter any topic. Get a study plan, take a quiz, and know exactly what to learn next — in seconds."


🔗 Try It Out


💡 Inspiration

Every day, millions of Indian students sit down to study and face the same question: "Where do I even start?"

I've seen friends spend more time figuring out how to study than actually studying. There's no shortage of content online — YouTube, PDFs, textbooks — but there's no intelligent guide that takes your specific topic and builds a personalized path just for you.

That's what inspired EduAgent. I wanted to build something that acts like a brilliant tutor who is available 24/7, never judges you, and always knows exactly what you need to learn next. Education in India needs a revolution — and AI is the tool to make it happen.


🤖 What It Does

EduAgent is an intelligent AI study agent that transforms any topic into a complete learning experience in three steps:

Step 1 — Personalized Study Plan Type any topic — "Photosynthesis", "Newton's Laws", "Indian Constitution" — and EduAgent instantly generates a structured 5-step study roadmap with descriptions and key concepts for each step. No more staring at a blank page wondering where to begin.

Step 2 — Adaptive Quiz Once you've reviewed the plan, EduAgent generates 5 multiple choice questions specifically about your topic. Each question comes with instant feedback — green for correct, red for wrong — and a clear explanation so you actually understand why the answer is what it is.

Step 3 — Smart Evaluation & Recommendations After the quiz, EduAgent analyzes your score and gives you a personalized summary. Scored 3/5? It tells you exactly which subtopics to revisit. Scored 5/5? It pushes you to the next level. Every session ends with a clear next step.


🛠️ How I Built It

EduAgent is built on a clean, modern stack designed for speed and reliability:

Backend — FastAPI (Python) The backend is a FastAPI server exposing three REST endpoints: /study-plan, /quiz, and /evaluate. Each endpoint calls a dedicated AI agent function with a carefully crafted prompt that returns structured JSON. I used strict JSON-only prompting to ensure the AI always returns parseable, consistent responses.

AI Layer — Groq API + LLaMA 3.1 The intelligence behind EduAgent is LLaMA 3.1 8B running on Groq's inference infrastructure. Groq is blazing fast — responses come back in under 2 seconds — which makes the user experience feel instant and magical. I chose LLaMA 3.1 because it handles structured JSON generation reliably and has strong reasoning capabilities for educational content.

Frontend — React + Vite The frontend is a single-page React app with four screens: Home, Study Plan, Quiz, and Results. I built a custom dark theme UI with CSS animations, gradient effects, and a smooth progress bar for the quiz. The entire UI is designed to feel modern and delightful — not like a typical student tool.

AI Agent Architecture — 3-Stage Pipeline

User Input (Topic) ↓ [Agent 1] Study Plan Generator → Structured 5-step roadmap with key concepts ↓ [Agent 2] Quiz Generator → 5 MCQs with options, correct answers, explanations ↓ [Agent 3] Evaluation Agent → Score analysis + personalized next-topic recommendations

Each agent receives a carefully engineered prompt that includes the topic context, output format specification, and quality constraints. The agents are stateless and fast — each call is independent and returns in under 2 seconds.


🚧 Challenges I Ran Into

1. API Compatibility Issues The Google Generative AI Python package was deprecated mid-build, and the Gemini free tier quota was exhausted on my account. I had to pivot quickly to Groq + LLaMA 3.1, which turned out to be a better choice — faster, more reliable, and genuinely free.

2. CORS in GitHub Codespaces Codespaces adds a security layer that blocks cross-origin requests between ports. Solving this required adding an explicit OPTIONS preflight handler in FastAPI in addition to the standard CORS middleware — something not documented anywhere for this specific setup.

3. Structured JSON Reliability Getting the LLM to consistently return valid, parseable JSON without extra text or markdown fences required careful prompt engineering. I added a clean_json() utility that strips any formatting artifacts before parsing.

4. Score Calculation Bug React's state updates are asynchronous, which caused the final quiz score to be calculated before the last answer was recorded. Fixed by computing the final score directly from the answers array at submission time rather than relying on state.


🏆 Accomplishments I'm Proud Of

  • Built a fully functional AI agent app solo from scratch
  • The app works end-to-end with zero crashes during testing
  • The UI looks genuinely professional — not like a typical hackathon project
  • Solved real engineering problems (CORS, async state, JSON parsing) under time pressure
  • The AI responses are consistently high quality across wildly different topics — from Class 10 science to competitive exam prep

📚 What I Learned

  • How to design and engineer AI agent pipelines with structured outputs
  • Prompt engineering for reliable JSON generation from LLMs
  • How to build and connect a FastAPI backend to a React frontend
  • Debugging CORS issues in Codespaces environments
  • How to ship fast — prioritizing features that matter for the demo

🔮 What's Next for EduAgent

EduAgent is just getting started. Here's the roadmap:

  • 🇮🇳 Multi-language support — Hindi, Tamil, Telugu for regional students
  • 📄 PDF/NCERT Upload — Upload your textbook, get a study plan from it
  • 🎙️ Voice Input — Speak your topic instead of typing
  • 📈 Progress Tracking — Track performance across sessions over time
  • 🏫 Classroom Mode — Teachers can assign topics, students compete on leaderboards
  • 🔔 Daily Study Reminders — Spaced repetition scheduling

🧰 Built With

python, fastapi, react, vite, groq, llama-3.1, javascript, css3, github-codespaces, rest-api, prompt-engineering, artificial-intelligence, education-technology


👤 Team

Anirudh Lohiya — Solo Developer

  • Designed the AI agent architecture
  • Built the FastAPI backend
  • Built the React frontend
  • Engineered all AI prompts
  • Deployed and submitted within 5 days

Built for AgentathonX 2026 — India's First Online AI Agent Hackathon by HiGen Labs

Built With

Share this project:

Updates