A browser-based 3D classroom where an animated AI teacher teaches one student one-on-one. The teacher speaks, walks, points, writes exact content on a structured whiteboard, projects real footage (and generated cutaways), waits for the student to answer, and remembers what was mastered — across sessions.
Built on the Stagehand protocol inherited from LLM-Chess and Clio:
The model narrates and proposes. Validators authorize. Reducers commit. Renderers perform.
The LLM teacher's raw output is treated as source code: parsed, repaired, schema-validated, and reduced to canonical state before anything becomes visible. Hallucinated commands are rejected with named errors on a private production channel; the student sees only validated effects.
- Live AI teaching — a director model (OpenRouter) teaches multi-turn lessons, responds to typed and clicked answers, and is held to a vocabulary generated from the command schemas. Without a key, an authored scripted lesson runs instead.
- Structured whiteboard — exact text, LaTeX, diagrams, highlights and pages, rendered to a 3D surface from a canonical document. The accessible transcript is generated from the same document, so it cannot drift from what is drawn.
- Readiness gating — spoken lines hold until the visual they name is readable; the teacher steps out of the sightline when writing starts; a projection hold waits for the footage to finish instead of talking over it.
- Clickable practice — model-then-practice phases with clickable board answers, and a validator that refuses to declare an objective covered until the student solved an independent problem.
- Knowledge graphs — ~570 skills across math (pre-K → Calculus 3 + differential equations), physics, chemistry, computer science, economics, and Earth & space science, as one prerequisite DAG with cross-subject edges and standards codes (CCSS, NGSS, CSTA, CEE).
- A persistent learner model — per-skill mastery evidence with a 21-day decay half-life, "ready now" frontier and review-queue queries, persisted locally.
- Projected media — public-domain NASA footage as a local media library, plus local MiniMax-H3 video generation through ComfyUI as an optional path.
npm install
npm run fetch:avatar # rigged teacher avatar (three.js examples)
npm run fetch:media # NASA orbit footage (public domain)
Copy-Item .env.example .env # add OPENROUTER_API_KEY and/or OPENAI_API_KEY
npm run dev # http://localhost:5180Optional: a local ComfyUI at 127.0.0.1:8188 with MiniMax-H3 enables generated video
(server/comfy/h3-t2v.api.json is the workflow). Without any keys the classroom still runs:
the scripted lesson plays with timed captions.
HANDOFF.md has the full architecture map, the doctrine, and the build order.
npm run typecheck # strict TypeScript
npm run test # 318 tests, including knowledge-graph integrity and lesson drift guards
npm run build- Teacher avatar: RobotExpressive, from the three.js examples (MIT).
- Curriculum structure follows Illustrative Mathematics K–5; science skills follow NGSS disciplinary core ideas.
- Orbit footage: NASA, "Your Orbiting Laboratory" (public domain), via
npm run fetch:media. - Physics, chemistry, Earth & space skills are aligned to NGSS disciplinary core ideas; CS skills to CSTA K–12 standards; economics to the Voluntary National Content Standards.