Inspiration

While preparing for internships at IIT Roorkee, we found ourselves stuck in the same loop millions of students face—solving endless DSA problems, jumping between YouTube videos and one-size-fits-all articles, yet still feeling directionless.

According to our research:

  • 4M+ engineering students in India struggle with technical placement preparation
  • Technical learners globally face the same “tutorial hell”

We realized the real issue isn’t the lack of content but the lack of personalized, real-time guidance.

That frustration, combined with our curiosity for agentic AI systems, inspired us to build the adaptive tutor we always wished we had.


What it does

OnLearn is an AI-powered adaptive tutor that identifies conceptual gaps, analyzes mistakes, and dynamically reroutes a learner’s path.

Key capabilities include:

  • Identifying conceptual gaps in a learner’s understanding
  • Analyzing mistakes and reasoning patterns
  • Dynamically rerouting learning paths based on mastery
  • Providing Socratic, conversational explanations
  • Adjusting difficulty based on pace and retention

Instead of acting like a static content platform, OnLearn behaves like a 1:1 intelligent mentor.

It bridges theory and coding practice through an integrated IDE, ensuring learners move from confusion to clarity through personalized learning pathways rather than one-size-fits-all content.


How we built it

OnLearn is built as a multi-agent AI learning system designed to orchestrate personalized learning journeys in real time.

Multi-Agent Learning Architecture

The system uses specialized agents that collaborate to guide a learner from concept understanding to coding practice.

  • Planner Agent

    • Understands user goals during onboarding
    • Generates personalized learning roadmaps for topics like DSA or Data Science
  • Master Agent (Retriever / Memory Manager)

    • Maintains learning memory across sessions
    • Retrieves past interactions and progress
    • Orchestrates the overall learning flow
  • Concept Tutor Agent (Executor)

    • Teaches concepts using Socratic explanations
    • Guides learners step-by-step instead of giving direct answers
  • Lab Mentor Agent

    • Evaluates coding solutions
    • Provides debugging hints and feedback

This agent collaboration allows OnLearn to dynamically generate session tasks, guide reasoning, evaluate code, and update learning progress continuously. :contentReference[oaicite:0]{index=0}


System Architecture

The platform combines a modern web interface with a scalable AI orchestration backend.

Frontend

  • Next.js interface with an interactive dual-pane learning layout
  • Monaco Editor for integrated coding practice
  • Real-time chat interface for AI tutoring

Client-Side Execution

  • Pyodide (WebAssembly) runs Python directly in the browser
  • Enables zero-latency code execution without server round-trips

Backend Orchestration

  • FastAPI backend coordinates agent interactions and user sessions
  • Handles requests, context management, and task routing between agents

Agent Framework

  • Built using the DeepAgents framework
  • Used to manage:
    • agent state
    • tool access
    • memory
    • learning plan schemas

Infrastructure

  • MongoDB – stores user state, learning plans, and progress
  • Redis – caching and short-term session memory
  • Judge0 – secure sandboxed backend code execution

This architecture allows OnLearn to maintain persistent learning memory while delivering real-time tutoring and coding feedback. :contentReference[oaicite:1]{index=1}


Challenges we ran into

Designing meaningful personalization was difficult—early versions felt generic.

Key challenges included:

  • Modeling prerequisite relationships between concepts
  • Building persistent learning memory
  • Ensuring stable coordination between multiple AI agents
  • Maintaining low inference costs for real-time adaptive feedback
  • Modeling student mastery and tuning evaluation weights
  • Designing human-like pedagogical explanations
  • Ensuring smooth transitions between conceptual learning and coding

Maintaining secure and responsive code execution also required balancing sandbox constraints, latency, and system reliability.


Accomplishments that we're proud of

We built a fully functional adaptive tutor with:

  • Conversational understanding
  • Real-time code evaluation
  • Deep personalization
  • Persistent learning memory

Over 150 students tested early versions and reported:

  • Faster conceptual clarity
  • Reduced confusion during problem solving
  • Improved confidence in learning

This validated both the demand and the effectiveness of our adaptive learning design.


What we learned

We learned that learning is nonlinear, and effective personalization requires combining diagnostics, memory, and adaptive sequencing.

Real pedagogy isn’t just giving answers—it’s guiding reasoning.

We also gained strong insights into:

  • Designing agent-based AI workflows
  • Modeling learner mastery
  • Optimizing LLM inference costs
  • Building user-centric educational experiences

What's next for OnLearn

We’ll expand beyond DSA and Data Science into broader STEM subjects.

Next steps include:

  • Building campus partnerships
  • Expanding adaptive curriculum coverage
  • Implementing probabilistic mastery models
  • Improving long-term learning memory and adaptive routing

Our long-term vision is to make OnLearn a global AI-native learning ecosystem delivering truly personalized education at scale.

Built With

Share this project:

Updates