Lesson

Agent Video View

The agent builds a lesson from the JSON below: it plans, searches notes, draws, picks pictures and writes a quiz you can answer. Paste a new lesson and press Build. Or type a topic above and the chat manager writes the lesson.

Planning
0:00 / 0:00
Lesson JSON

Ask Claude for a lesson on any topic, paste the JSON here and press Build. The same JSON can come from an API model later.

Tool reference
Lesson: { "title": "...", "defs": {optional named drawings}, "scenes": [ ...up to 20... ] }
Every scene: "type", optional "title" (chapter name), "say": [lines]. Each line is spoken and shown as a caption; scene length follows the lines. Optional on any scene: "bg", "tone", "transition" (see below).

title   { kicker, heading:"text with **highlight**", goals:["..."] }
search  { query, passages:[{src, score 0-1, text}] (2-5), threshold:0.6, cites:2, answer:"..**hl**.." }  say: 4 lines (query, results, rerank, answer)
draw    { shapes:[...], view:[400,270] }
images  { kicker, items:[{title, caption:"..**hl**..", art:[shapes in 100x100], ring:[cx,cy,rx,ry]}] } (1-4)
quiz    { title, sub, questions:[...] }  (one per lesson; adds a "Your turn" step where the student answers)
   {k:"mcq", q, o:[2-4 options], a:index, why}
   {k:"fill", q:"text with {} for the blank", ok:[accepted answers], show, why}
   {k:"text", q, sch:[[label, [[any of these words], [and any of these]]], ...], model, hint}  (1 mark per scheme item)
check   { heading, kicker, questions:[1-4 questions, same shapes as quiz] }  (the system adds this at the end of each lesson minute; the student answers, typed answers are marked by the model)
outro   { heading, items:["text" | {text, meta}] }

Shapes (draw and image art, up to 1500 per scene; groups count). Every shape may have: at (which say line it appears on, 0 = first), word ("cloud": appears as that word is spoken), delay (seconds), d (seconds to appear), sw (line width), anim:"draw"|"fade"|"show", op (opacity 0-1), id (a name), blur, shadow:true
{t:"circle",x,y,r} {t:"ellipse",x,y,rx,ry} {t:"rect",x,y,w,h,rx} {t:"line",x1,y1,x2,y2,arrow:true}
{t:"path",d:"M0 0 Q..",arrow:true} {t:"poly",pts:[[x,y],...]} {t:"text",s,x,y,size,color,anchor,bold,font:"hand|body|display|mono"}  (emoji work in text)
{t:"icon",name:"heart",x,y,size:32,color}  any Font Awesome Free icon, centred on x,y (size = height in px). name is the icon name without "fa-": "bolt", "magnet", "atom", "temperature-high"; add style for outline or brand icons: "regular star", "brands github". Fades in like text.
{t:"curve",pts:[[x,y],...],closed:true,tension:1}  smooth curve through the points: good for organic cartoon outlines
{t:"arc",x,y,r,a0,a1,pie:true} (degrees, 0 = right, clockwise)  {t:"star",x,y,r,r2,n}  {t:"ngon",x,y,r,n}
path, curve and arc can also take fill.
Colours: ink muted green blue coral sun brown leaf soil card white black red orange yellow purple pink teal gray sky water glass skin, or #hex, rgb(), rgba()

GRADIENTS (fill, stroke, color, text colour, shade)
 fill:["sun","coral"]                        top to bottom
 fill:{lin:[c1,c2,..],angle:90}              angle 0 = left to right, 90 = top to bottom. A stop can be [offset 0-1, colour, opacity]
 fill:{rad:[c1,c2],cx:.4,cy:.35,r:.5}        radial; cx, cy, r are fractions of the shape (offset the centre for a shiny ball)
 shade:{...}                                 a second gradient laid over the fill, for gloss and shadow, e.g. {lin:[[0,"#fff",.5],[1,"#000",.2]],angle:45}

GROUPS AND TRANSFORMS (any shape, or {t:"group",children:[...]}; groups nest up to 8 deep)
 tx ty (move)  rot (degrees, clockwise)  scale  sx sy (stretch)  skx sky (skew)  pivot:[x,y] (centre of rot and scale, in the shape's own coordinates)
 clip:{any shape}   shows the group only inside that window, which stays still while things move inside it (liquid in a cup). clipIn: the window moves with the group
 rep:{n,tx,ty,rot,scale,delay}   repeats a shape or group n times; each copy steps by the amounts given
 together:true   a group's shapes all appear at once
 defs:{name:[shapes]} at lesson or scene level, then {t:"use",ref:"name",vars:{..}} places a copy (it takes tx, rot, scale, id, go, ... like a group). In a drawing, "$name" is replaced by the value in vars. A def can also be {vars:{..},pivot:[x,y],shapes:[..]}
 Built-in drawings: cup {c,lv}  jug {c}  cloud {c,o}  sun  drop {c,s}  tree. The cup's liquid is a shape with id "liquid"; the jug's pivot is its spout.

ANIMATION
 go:[{at,delay,d,ease,tx,ty,rot,scale,sx,sy,skx,sky,op, by:{..}, from:{..}, on:"childId", along:"M.. path", orient:true}]
   moves or changes a shape or group during say line "at" (delay and d in seconds). Steps run in order. Values are absolute; "by" is relative.
   ease: inOut (default) in out linear bounce back elastic.  on: animate a shape inside the group instead.  along: travel along a path
 osc:{rot:[amount,seconds],ty:[..],scale:[..],op:[..]}   keeps wobbling: bobbing, breathing, swaying.   spin:degrees per second
 To pour: tilt the jug with rot; a stream rect with sy 0 to 1 (pivot at its top); the cup's liquid sy 0 to .8 (see the "Robo pours water" scene)

SPRITES  {t:"use",ref:"cat",id:"cat",tx:80,ty:246,scale:1,vars:{..}}
 Ground sprites stand with their feet at (0,0), so tx,ty is where they stand. Give each an id to point at it or animate its parts.
 person {skin,shirt,pants,hair,hairStyle:"short|long|none",pose:"stand|wave|walk|cheer",mood}  parts: head armL armR legL legR
 robot {c,pose:"stand|wave|walk|cheer",mood}  parts: head armL armR legL legR ball
 cat {c,pose:"stand|walk"}  dog {c,ear,pose:"stand|walk"}  face right; add sx:-1 to face left. parts: head tail legFL legFR legBL legBR
 bird {c,fly:true|false} (centred, flaps)  ball {c}  table {c}  house {c,roof}  flower {c,mid} (sways)
 face {c,mood} (centred, radius 30)   mood: happy sad surprised angry sleepy wink neutral
 To walk: pose:"walk" plus a go step that moves tx.
 RULE for use: ref must be a built-in drawing or sprite named above, or a name you put in defs. Never invent one (no "wing", "cloud2"): the scene will not play. Build anything else from shapes.

BACKGROUNDS, CAMERA, TRANSITIONS
 bg:"sky|sunset|night|room|ocean|space|paper" or "#hex" or a list of shapes (any scene; also allowed at lesson level as the default).
 tone:"light|dark" sets the text colours over the backdrop (sunset, night, space are dark).
 In draw scenes the ground starts at y 228 (floor at 236 in "room"): stand sprites at about ty 246. The backdrop is far wider than the view.
 camera (draw only): [{at | word, delay, d, ease, zoom, x, y}]  zoom 1 = whole view; x,y = point to centre on (view is 400 by 270). Steps run in order: zoom back with {zoom:1,x:200,y:135}. Pointers and highlights with a target follow the camera; fixed to/box coordinates stay in screen coordinates.
 transition (how this scene comes in): "fade" (default) cut slide slideright slideup slidedown zoom wipe dip, or {type, d:seconds}. Lesson-level "transition" is the default.

WORD SYNC
 Any shape, pointer, highlight, go step or camera step may take word:"cloud" (nth:2 for the second time it is said; at:line to look in one line only). It happens as that word is spoken; a pointer arrives on the word. The word must be in the say lines of the same scene. A word pins an absolute time inside its line.

POINTERS AND HIGHLIGHTERS (always drawn on top, in scene coordinates)
 {t:"pointer",target:"id" | to:[x,y],via:[[x,y]..],from:[x,y],at,delay,d (travel seconds),click:true,hold:1.2,stay:true,label:"text",color,size}
 {t:"highlight",target:"id" | box:[x,y,w,h],style:"box|circle|underline|marker|spot",at,delay,d,hold (seconds; leave out to stay),color,pad,pulse:true,under:true,dim:.5,round:true}
 target is the id of a shape or group and follows it as it moves.

Everything on this page is scripted. The retrieval scores, source names, images and quiz are sample content, and the cursor, typing and highlights are drawn by the page itself. Narration uses one Edge neural voice (Ana for kids' lessons), with your browser's voices as a backup. Quiz answers are marked on this page and never leave it.