EdTech ยท Applied AI & Cognitive Science Engineering

AI Tutor Platform

A production-shaped, multi-service K-12 math tutoring system that models what a student is likely to have forgotten, watches them work through a live vision-and-voice AI tutor, and supervises its own conversation with a second AI.

EdTech / K-12 mathematics
  • 0

    Production microservices

  • 80k

    Lines of code

  • 10fps

    Live vision on scratchpad

OVERVIEW

What we delivered

A production-shaped, multi-service K-12 math tutoring system that models what a student is likely to have forgotten, watches them work through a live vision-and-voice AI tutor, and supervises its own conversation with a second AI.

TechAelia's AI engineering team built a full-stack, nine-service adaptive learning platform for K-12 mathematics that goes well beyond a percentage-correct progress bar. The system tracks a continuous memory-strength value per skill for every student and predicts, using a sigmoid function over that strength versus item difficulty, how likely they are to answer correctly right now, today, given what they have and have not practiced recently. While the student works, they hold a live spoken conversation with an AI tutor persona named Adam, who watches their handwritten work on a digital scratchpad through a real-time composited video feed and teaches using the Socratic method rather than handing over the answer. A second, supervisory AI observes that same conversation and can inject corrective instructions back into it mid-session, for example prompting Adam to check in if a student goes quiet for too long.

What is the forgetting curve in adaptive learning? It is a model, drawn from cognitive-science research, that treats a student's knowledge of a skill as a physical quantity that decays exponentially over time rather than a fixed score, so the system can predict not just what a student once knew, but what they are likely to have already forgotten.

What makes the vision-aware tutor different from a typical AI chatbot? The browser composites the student's handwriting scratchpad, an optional screen share, and an optional webcam feed into a single video stream in real time, passes it through edge detection to sharpen handwriting, and streams that single feed to Gemini's Live API, so the tutor can genuinely watch the work happen rather than only reading a final typed answer.

  • Client

    EdTech / K-12 mathematics

  • Timeline

    Ongoing production engineering build

  • Team

    AI/ML and full-stack engineering

The starting point

Every "adaptive" tutoring product tracks a score. Almost none of them model forgetting.

Building a tutor that teaches the way a good human tutor does required solving three much harder problems at once.

Most adaptive learning products reduce a student's understanding to a single percentage-correct number, which cannot distinguish a student who mastered a skill last month and is now rusty from one who never learned it at all. Modeling memory as something that genuinely decays over time, giving an AI the ability to actually see a student's handwritten work rather than only reading typed answers, and keeping a live multimodal AI conversation from silently drifting off course during a real tutoring session each required a different class of engineering.

The system also had to behave sensibly for a brand-new student with zero history, from the very first question, without waiting for training data to accumulate.

  • Percentage-correct tracking cannot tell forgotten-and-rusty apart from never-learned
  • Multimodal APIs accept a single image stream, not three separate video sources at once
  • A long, unsupervised live AI conversation has no built-in mechanism to notice it is going wrong
  • The system had to behave sensibly for a brand-new student with zero history, from the very first question
THE WORK

Problem to production

How we moved from a hard constraint to a system running in production.

  1. 01

    The challenge

    Every "adaptive" tutoring product tracks a score. Almost none of them model forgetting.

    Building a tutor that teaches the way a good human tutor does required solving three much harder problems at once.

    Most adaptive learning products reduce a student's understanding to a single percentage-correct number, which cannot distinguish a student who mastered a skill last month and is now rusty from one who never learned it at all. Modeling memory as something that genuinely decays over time, giving an AI the ability to actually see a student's handwritten work rather than only reading typed answers, and keeping a live multimodal AI conversation from silently drifting off course during a real tutoring session each required a different class of engineering.

    The system also had to behave sensibly for a brand-new student with zero history, from the very first question, without waiting for training data to accumulate.

    • Percentage-correct tracking cannot tell forgotten-and-rusty apart from never-learned
    • Multimodal APIs accept a single image stream, not three separate video sources at once
    • A long, unsupervised live AI conversation has no built-in mechanism to notice it is going wrong
    • The system had to behave sensibly for a brand-new student with zero history, from the very first question
  2. 02

    Our approach

    Implement a published cognitive-science model, then give the AI a genuine set of eyes.

    The team implemented DASH (Mozer and Lindsey), a memory model from the cognitive-science literature, as the adaptive engine's core.

    Each skill carries a continuous memory-strength value; the probability of a correct answer is a sigmoid over that strength minus the item's difficulty, and strength decays exponentially at a per-skill forgetting rate. On top of the base model sit four deliberate design refinements: diminishing returns on repeated practice so grinding one skill cannot fake mastery, a response-time penalty so a slow correct answer counts as weaker evidence than a fast one, prerequisite back-propagation so a wrong answer also lowers confidence in every underlying skill it depends on, and a mastery freeze that stops decay once a skill crosses a real-mastery threshold.

    For the second AI, the team built a supervisory service that ingests the live session feed over WebSocket and pushes instructions back into the tutor's live context over Server-Sent Events, for example detecting 60 seconds of silence and prompting the tutor to check in naturally, in its own voice. That service was deliberately re-architected from an early in-memory, single-instance design into a stateless, MongoDB-backed session model with automatic expiry, so the platform can scale horizontally across multiple concurrent classrooms.

    • DASH memory model with sigmoid response prediction and exponential decay per skill
    • Prerequisite back-propagation so one wrong answer diagnostically updates an entire skill-dependency chain
    • Real-time media compositing of scratchpad, screen, and webcam into one edge-filtered video stream at 10 fps
    • Stateless, horizontally scalable session architecture for the supervisory AI service
  3. 03

    Our implementation

    Nine microservices, direct-to-model streaming for latency, and cost governance built in from day one.

    The platform runs as nine independently deployable Python services coordinated through MongoDB.

    Adaptive question selection, question loading, session and instruction orchestration, authentication, homework processing, payments, cost tracking, question generation, and an experimental avatar agent each ship as separate services, with a dedicated Pinecone vector store for long-term, cross-session student memory. The browser talks directly to Gemini's Live API over WebSocket rather than proxying audio through the backend, cutting a full network hop of latency out of every spoken exchange; because the raw API key cannot safely reach the browser, the team built a JWT-gated endpoint that mints a short-lived, use-limited ephemeral token instead, so the provider key never leaves the server.

    Because live multimodal AI inference carries real per-token cost, the team also built cost governance directly into the platform: usage is tracked per session, per modality, and per token class (including the 90 percent discount Google applies to cached content), with careful handling of the fact that the Gemini Live API reports token counts cumulatively rather than incrementally, a subtlety that would otherwise silently inflate reported cost many times over if missed. A four-tier model router sends simple requests to cheaper, faster models and only escalates to premium-tier inference when task complexity actually warrants it.

    • Nine-service microservices architecture coordinated through MongoDB, with Pinecone for long-term vector memory
    • Direct browser-to-model streaming secured by short-lived, use-limited ephemeral tokens rather than exposed API keys
    • Per-modality, per-token-class cost accounting with correct cumulative-to-delta token conversion
    • Complexity-based four-tier model routing to control inference cost at scale
IN PRODUCTION

Screens we shipped

Product views and systems running on live data.

Adaptive question panel powered by DASH memory model for K-12 math

Adaptive question panel showing the skill, difficulty, and adaptive adjustment behind the specific question a student was served, powered by the Khan Academy Perseus rendering engine.

Real-time AI tutor viewing student handwriting on a digital scratchpad

Live tutor session view with the composited scratchpad, screen, and webcam feed the AI tutor uses to watch the student's handwritten work in real time.

Per-modality LLM cost tracking dashboard for AI tutoring sessions

Cost-tracking admin dashboard showing per-modality, per-session token cost for a completed tutoring conversation.

OUTCOMES

Measured impact

Building the DASH model correctly turned out to matter far more than any single feature on top of it.

Last updated

  • 9

    Independently deployable microservices

  • 18,781

    Curriculum exercises mapped at runtime

  • 4

    Tutoring modalities composited in real time

  • 3

    Channel cost governance (session/modality/token)

  • 1

    Supervisory AI steering a second AI live

  • 339

    Commits across ~79,600 lines of code

A system that forgets nothing and never re-tests old material eventually asks a student ninety questions on a skill they mastered months ago; a system that models genuine decay instead surfaces exactly the right review at exactly the right moment, without a human ever manually scheduling it.

The vision-aware tutor and the supervisory AI layer proved just as important for trust as they are for the demo moment. A student who can show their real handwritten work to an AI tutor, and get a response grounded in what they actually wrote, engages very differently than one typing into a text box, and a tutor that notices when a student has gone quiet feels attentive in a way a static chatbot cannot replicate.

โ€œThe intellectual core of this project is the DASH engine. Everything else, the microservices, the real-time audio, the vector memory, the cost accounting, exists to serve a single idea: that a tutoring system should model what a student is likely to have forgotten, and teach accordingly.โ€

TECHNOLOGY

Tech stack

Tools chosen for scale, auditability, and clean handoff.

AI & Real-Time Multimodal

  • Google Gemini Live API (native audio, direct browser WebSocket)
  • Google Gemini (text)
  • OpenRouter (secondary provider)
  • Pinecone with multilingual-e5-large embeddings
  • Canny edge-detection video filtering

Application Layer

  • Python 3.11
  • FastAPI
  • Uvicorn
  • React 18
  • TypeScript
  • Vite
  • Tailwind CSS
  • Zustand
  • TanStack React Query
  • Radix UI
  • Framer Motion

Data & Storage

  • MongoDB with GridFS
  • TTL-indexed session storage
  • Pinecone vector store

EdTech Integrations

  • Khan Academy Perseus question-rendering engine
  • Excalidraw handwriting scratchpad

Security & Identity

  • JWT authentication
  • Google OAuth
  • Ephemeral single-purpose API tokens
  • bcrypt password hashing

Infrastructure & DevOps

  • Docker
  • Google Cloud Run
  • Google Cloud Build
  • GitHub Actions CI/CD
  • pytest coverage gates
  • Lighthouse CI performance budgets

Start a similar project

Building an EdTech product that needs to genuinely model how students learn, not just track whether they got the right answer? TechAelia's AI engineering team designs the cognitive modeling, real-time multimodal pipelines, and agentic architecture underneath production learning platforms.

Contact Us

Explore our work

Browse the full portfolio of client programs and outcomes.

All case studies
MORE WORK

Related case studies

Other programs from our portfolio.

AI automation, custom software, and bilingual voice AI for teams that need production delivery.

Ready to scale your digital infrastructure?

Partner with TechAelia to architect custom enterprise software, autonomous AI workflows, and high-performance native mobile applications. We build scalable digital products engineered to outpace the competition.