{"track":"agents","examples":[{"id":"agent-prompt-chain","track":"agents","title":"Prompt chain","summary":"Split a task into steps, each model call taking the last one's output, with a plain-code check between them. Use it when: The task splits cleanly into fixed steps, and you would trade a little speed for accuracy.","principle":"agents-checks","also":["agents-simplest"],"tags":["agents","prompt-chain"],"evidence":["lib/json-render/compose.ts (composeSpec, selectQuestions, layoutQuestions)","lib/json-render/catalog.ts (validateSpec)"],"body":{"kind":"motion","plan":{"title":"Prompt chain: draft, check, refine","caption":"A gate between steps catches a bad draft before it is polished.","duration":11.05,"elements":[{"id":"ask","kind":"card","at":[16,45],"title":"Request","tone":"accent"},{"id":"draft","kind":"card","at":[48,45],"title":"Draft","subtitle":"model call"},{"id":"gate","kind":"card","at":[80,45],"title":"Check","subtitle":"code, not a model","tone":"warning","w":27},{"id":"refine","kind":"card","at":[112,45],"title":"Refine","subtitle":"model call"},{"id":"out","kind":"card","at":[144,45],"title":"Answer","tone":"success"},{"id":"e1","kind":"beam","from":"ask","to":"draft","label":"task"},{"id":"e2","kind":"beam","from":"draft","to":"gate","label":"draft"},{"id":"e3","kind":"beam","from":"gate","to":"refine","label":"passes"},{"id":"e4","kind":"beam","from":"refine","to":"out","label":"final"}],"beats":[{"do":"settle_in","at":0.2,"targets":["ask"]},{"do":"settle_in","at":0.47,"targets":["draft"]},{"do":"settle_in","at":0.74,"targets":["gate"]},{"do":"settle_in","at":1.01,"targets":["refine"]},{"do":"settle_in","at":1.28,"targets":["out"]},{"do":"caption","at":0.2,"text":"A gate between steps catches a bad draft before it is polished.","secs":1.4500000000000002},{"do":"connect","at":1.85,"beam":"e1","secs":0.5},{"do":"send","at":2.3,"beam":"e1","label":"task","secs":0.8},{"do":"caption","at":1.85,"text":"Request → Draft (task)"},{"do":"connect","at":3.45,"beam":"e2","secs":0.5},{"do":"send","at":3.9,"beam":"e2","label":"draft","secs":0.8},{"do":"caption","at":3.45,"text":"Draft → Check (draft)"},{"do":"connect","at":5.05,"beam":"e3","secs":0.5},{"do":"send","at":5.5,"beam":"e3","label":"passes","secs":0.8},{"do":"caption","at":5.05,"text":"Check → Refine (passes)"},{"do":"connect","at":6.65,"beam":"e4","secs":0.5},{"do":"send","at":7.1,"beam":"e4","label":"final","secs":0.8},{"do":"caption","at":6.65,"text":"Refine → Answer (final)"},{"do":"focus","at":8.25,"target":"out","secs":0.8},{"do":"release","at":9.85,"secs":0.8}]},"transcript":["0.2s: Request appears","0.2s: A gate between steps catches a bad draft before it is polished.","0.5s: Draft appears","0.7s: Check appears","1.0s: Refine appears","1.3s: Answer appears","1.9s: Request → Draft connects","1.9s: Request → Draft (task)","2.3s: “task” travels Request → Draft","3.5s: Draft → Check connects","3.5s: Draft → Check (draft)","3.9s: “draft” travels Draft → Check","5.0s: Check → Refine connects","5.0s: Check → Refine (passes)","5.5s: “passes” travels Check → Refine","6.7s: Refine → Answer connects","6.7s: Refine → Answer (final)","7.1s: “final” travels Refine → Answer","8.3s: the camera moves in on Answer","9.8s: the camera pulls back"]}},{"id":"agent-routing","track":"agents","title":"Routing","summary":"Classify the input once, then send it to a specialist with its own prompt and tools. Use it when: There are distinct kinds of request that are better served separately, and classifying them is reliable.","principle":"agents-simplest","tags":["agents","routing"],"evidence":["lib/evaluate/gateway.ts (Question, Answer)","lib/jev/index.ts (layoutFor)"],"body":{"kind":"motion","plan":{"title":"Routing: classify, then specialise","caption":"One cheap decision picks the right specialist.","duration":9.42,"elements":[{"id":"ask","kind":"card","at":[20,45],"title":"Request","tone":"accent"},{"id":"router","kind":"card","at":[60,45],"title":"Router","subtitle":"choice question"},{"id":"billing","kind":"card","at":[100,22.5],"title":"Billing"},{"id":"tech","kind":"card","at":[100,45],"title":"Technical"},{"id":"general","kind":"card","at":[100,67.5],"title":"General"},{"id":"reply","kind":"card","at":[140,45],"title":"Reply","tone":"success"},{"id":"e1","kind":"beam","from":"ask","to":"router","label":"message"},{"id":"e2","kind":"beam","from":"router","to":"billing","label":"money"},{"id":"e3","kind":"beam","from":"router","to":"tech","label":"bug"},{"id":"e4","kind":"beam","from":"router","to":"general","label":"other"},{"id":"e5","kind":"beam","from":"billing","to":"reply"},{"id":"e6","kind":"beam","from":"tech","to":"reply"},{"id":"e7","kind":"beam","from":"general","to":"reply"}],"beats":[{"do":"settle_in","at":0.2,"targets":["ask"]},{"do":"settle_in","at":0.47,"targets":["router"]},{"do":"settle_in","at":0.74,"targets":["billing","tech","general"]},{"do":"settle_in","at":1.25,"targets":["reply"]},{"do":"caption","at":0.2,"text":"One cheap decision picks the right specialist.","secs":1.42},{"do":"connect","at":1.82,"beam":"e1","secs":0.5},{"do":"send","at":2.27,"beam":"e1","label":"message","secs":0.8},{"do":"caption","at":1.82,"text":"Request → Router (message)"},{"do":"connect","at":3.42,"beam":"e2","secs":0.5},{"do":"send","at":3.87,"beam":"e2","label":"money","secs":0.8},{"do":"connect","at":3.42,"beam":"e3","secs":0.5},{"do":"send","at":3.87,"beam":"e3","label":"bug","secs":0.8},{"do":"connect","at":3.42,"beam":"e4","secs":0.5},{"do":"send","at":3.87,"beam":"e4","label":"other","secs":0.8},{"do":"caption","at":3.42,"text":"Router → Billing (money), Router → Technical (bug), Router → General (other)"},{"do":"connect","at":5.02,"beam":"e5","secs":0.5},{"do":"send","at":5.47,"beam":"e5","secs":0.8},{"do":"connect","at":5.02,"beam":"e6","secs":0.5},{"do":"send","at":5.47,"beam":"e6","secs":0.8},{"do":"connect","at":5.02,"beam":"e7","secs":0.5},{"do":"send","at":5.47,"beam":"e7","secs":0.8},{"do":"caption","at":5.02,"text":"Billing → Reply, Technical → Reply, General → Reply"},{"do":"focus","at":6.62,"target":"reply","secs":0.8},{"do":"release","at":8.22,"secs":0.8}]},"transcript":["0.2s: Request appears","0.2s: One cheap decision picks the right specialist.","0.5s: Router appears","0.7s: Billing, Technical, General appear","1.3s: Reply appears","1.8s: Request → Router connects","1.8s: Request → Router (message)","2.3s: “message” travels Request → Router","3.4s: Router → Billing connects","3.4s: Router → Technical connects","3.4s: Router → General connects","3.4s: Router → Billing (money), Router → Technical (bug), Router → General (other)","3.9s: “money” travels Router → Billing","3.9s: “bug” travels Router → Technical","3.9s: “other” travels Router → General","5.0s: Billing → Reply connects","5.0s: Technical → Reply connects","5.0s: General → Reply connects","5.0s: Billing → Reply, Technical → Reply, General → Reply","5.5s: a packet travels Billing → Reply","5.5s: a packet travels Technical → Reply","5.5s: a packet travels General → Reply","6.6s: the camera moves in on Reply","8.2s: the camera pulls back"]}},{"id":"agent-parallel","track":"agents","title":"Parallelisation","summary":"Run independent calls at once and combine them: split the work (sectioning) or ask several times and vote. Use it when: Subtasks do not depend on each other, or you want several independent opinions on one question.","principle":"agents-simplest","tags":["agents","parallel"],"evidence":["lib/ensemble/core.ts (MEMBER_IDS, MEMBER_INFO)"],"body":{"kind":"motion","plan":{"title":"Parallelisation: independent members, one answer","caption":"Members score separately; a member that cannot score is left out, not counted as zero.","duration":7.55,"elements":[{"id":"goal","kind":"card","at":[26.67,45],"title":"Goal","tone":"accent"},{"id":"graph","kind":"card","at":[80,22.5],"title":"Graph"},{"id":"lexical","kind":"card","at":[80,45],"title":"Lexical"},{"id":"model","kind":"card","at":[80,67.5],"title":"Model"},{"id":"mean","kind":"card","at":[133.33,45],"title":"Weighted mean","tone":"success"},{"id":"e1","kind":"beam","from":"goal","to":"graph"},{"id":"e2","kind":"beam","from":"goal","to":"lexical"},{"id":"e3","kind":"beam","from":"goal","to":"model"},{"id":"e4","kind":"beam","from":"graph","to":"mean","label":"score"},{"id":"e5","kind":"beam","from":"lexical","to":"mean","label":"score"},{"id":"e6","kind":"beam","from":"model","to":"mean","label":"score"}],"beats":[{"do":"settle_in","at":0.2,"targets":["goal"]},{"do":"settle_in","at":0.47,"targets":["graph","lexical","model"]},{"do":"settle_in","at":0.98,"targets":["mean"]},{"do":"caption","at":0.2,"text":"Members score separately; a member that cannot score is left out, not counted as zero.","secs":1.2},{"do":"connect","at":1.55,"beam":"e1","secs":0.5},{"do":"send","at":2,"beam":"e1","secs":0.8},{"do":"connect","at":1.55,"beam":"e2","secs":0.5},{"do":"send","at":2,"beam":"e2","secs":0.8},{"do":"connect","at":1.55,"beam":"e3","secs":0.5},{"do":"send","at":2,"beam":"e3","secs":0.8},{"do":"caption","at":1.55,"text":"Goal → Graph, Goal → Lexical, Goal → Model"},{"do":"connect","at":3.15,"beam":"e4","secs":0.5},{"do":"send","at":3.6,"beam":"e4","label":"score","secs":0.8},{"do":"connect","at":3.15,"beam":"e5","secs":0.5},{"do":"send","at":3.6,"beam":"e5","label":"score","secs":0.8},{"do":"connect","at":3.15,"beam":"e6","secs":0.5},{"do":"send","at":3.6,"beam":"e6","label":"score","secs":0.8},{"do":"caption","at":3.15,"text":"Graph → Weighted mean (score), Lexical → Weighted mean (score), Model → Weighted mean (score)"},{"do":"focus","at":4.75,"target":"mean","secs":0.8},{"do":"release","at":6.35,"secs":0.8}]},"transcript":["0.2s: Goal appears","0.2s: Members score separately; a member that cannot score is left out, not counted as zero.","0.5s: Graph, Lexical, Model appear","1.0s: Weighted mean appears","1.6s: Goal → Graph connects","1.6s: Goal → Lexical connects","1.6s: Goal → Model connects","1.6s: Goal → Graph, Goal → Lexical, Goal → Model","2.0s: a packet travels Goal → Graph","2.0s: a packet travels Goal → Lexical","2.0s: a packet travels Goal → Model","3.1s: Graph → Weighted mean connects","3.1s: Lexical → Weighted mean connects","3.1s: Model → Weighted mean connects","3.1s: Graph → Weighted mean (score), Lexical → Weighted mean (score), Model → Weighted mean (score)","3.6s: “score” travels Graph → Weighted mean","3.6s: “score” travels Lexical → Weighted mean","3.6s: “score” travels Model → Weighted mean","4.8s: the camera moves in on Weighted mean","6.3s: the camera pulls back"]}},{"id":"agent-orchestrator","track":"agents","title":"Orchestrator and workers","summary":"A central model breaks the task down at run time, hands pieces to workers, and synthesises what comes back. Use it when: You cannot predict the subtasks in advance (how many files to change, which sources to read).","principle":"agents-simplest","tags":["agents","orchestrator"],"evidence":["lib/agents/runner.ts (runAgent, generateText, isStepCount)"],"body":{"kind":"motion","plan":{"title":"Orchestrator and workers","caption":"The orchestrator decides the pieces; workers do them; one step puts them together.","duration":9.42,"elements":[{"id":"task","kind":"card","at":[20,45],"title":"Task","tone":"accent"},{"id":"boss","kind":"card","at":[60,45],"title":"Orchestrator","subtitle":"plans the pieces"},{"id":"w1","kind":"card","at":[100,22.5],"title":"Worker 1"},{"id":"w2","kind":"card","at":[100,45],"title":"Worker 2"},{"id":"w3","kind":"card","at":[100,67.5],"title":"Worker 3"},{"id":"synth","kind":"card","at":[140,45],"title":"Synthesise","tone":"success"},{"id":"e1","kind":"beam","from":"task","to":"boss"},{"id":"e2","kind":"beam","from":"boss","to":"w1","label":"piece"},{"id":"e3","kind":"beam","from":"boss","to":"w2","label":"piece"},{"id":"e4","kind":"beam","from":"boss","to":"w3","label":"piece"},{"id":"e5","kind":"beam","from":"w1","to":"synth"},{"id":"e6","kind":"beam","from":"w2","to":"synth"},{"id":"e7","kind":"beam","from":"w3","to":"synth"}],"beats":[{"do":"settle_in","at":0.2,"targets":["task"]},{"do":"settle_in","at":0.47,"targets":["boss"]},{"do":"settle_in","at":0.74,"targets":["w1","w2","w3"]},{"do":"settle_in","at":1.25,"targets":["synth"]},{"do":"caption","at":0.2,"text":"The orchestrator decides the pieces; workers do them; one step puts them together.","secs":1.42},{"do":"connect","at":1.82,"beam":"e1","secs":0.5},{"do":"send","at":2.27,"beam":"e1","secs":0.8},{"do":"caption","at":1.82,"text":"Task → Orchestrator"},{"do":"connect","at":3.42,"beam":"e2","secs":0.5},{"do":"send","at":3.87,"beam":"e2","label":"piece","secs":0.8},{"do":"connect","at":3.42,"beam":"e3","secs":0.5},{"do":"send","at":3.87,"beam":"e3","label":"piece","secs":0.8},{"do":"connect","at":3.42,"beam":"e4","secs":0.5},{"do":"send","at":3.87,"beam":"e4","label":"piece","secs":0.8},{"do":"caption","at":3.42,"text":"Orchestrator → Worker 1 (piece), Orchestrator → Worker 2 (piece), Orchestrator → Worker 3 (piece)"},{"do":"connect","at":5.02,"beam":"e5","secs":0.5},{"do":"send","at":5.47,"beam":"e5","secs":0.8},{"do":"connect","at":5.02,"beam":"e6","secs":0.5},{"do":"send","at":5.47,"beam":"e6","secs":0.8},{"do":"connect","at":5.02,"beam":"e7","secs":0.5},{"do":"send","at":5.47,"beam":"e7","secs":0.8},{"do":"caption","at":5.02,"text":"Worker 1 → Synthesise, Worker 2 → Synthesise, Worker 3 → Synthesise"},{"do":"focus","at":6.62,"target":"synth","secs":0.8},{"do":"release","at":8.22,"secs":0.8}]},"transcript":["0.2s: Task appears","0.2s: The orchestrator decides the pieces; workers do them; one step puts them together.","0.5s: Orchestrator appears","0.7s: Worker 1, Worker 2, Worker 3 appear","1.3s: Synthesise appears","1.8s: Task → Orchestrator connects","1.8s: Task → Orchestrator","2.3s: a packet travels Task → Orchestrator","3.4s: Orchestrator → Worker 1 connects","3.4s: Orchestrator → Worker 2 connects","3.4s: Orchestrator → Worker 3 connects","3.4s: Orchestrator → Worker 1 (piece), Orchestrator → Worker 2 (piece), Orchestrator → Worker 3 (piece)","3.9s: “piece” travels Orchestrator → Worker 1","3.9s: “piece” travels Orchestrator → Worker 2","3.9s: “piece” travels Orchestrator → Worker 3","5.0s: Worker 1 → Synthesise connects","5.0s: Worker 2 → Synthesise connects","5.0s: Worker 3 → Synthesise connects","5.0s: Worker 1 → Synthesise, Worker 2 → Synthesise, Worker 3 → Synthesise","5.5s: a packet travels Worker 1 → Synthesise","5.5s: a packet travels Worker 2 → Synthesise","5.5s: a packet travels Worker 3 → Synthesise","6.6s: the camera moves in on Synthesise","8.2s: the camera pulls back"]}},{"id":"agent-evaluator-optimizer","track":"agents","title":"Evaluator and optimizer","summary":"One call produces, another judges against clear criteria, and the verdict goes back until it passes or a limit is hit. Use it when: You have clear criteria and a first draft is measurably improved by feedback.","principle":"agents-checks","also":["agents-simplest"],"tags":["agents","evaluator-optimizer"],"evidence":["lib/json-render/catalog.ts (validateSpec)","packages/chat-tools/src/core/motion-lint.ts (lintMotionPlan, repairMotionPlan)"],"body":{"kind":"motion","plan":{"title":"Evaluator and optimizer: loop until it passes","caption":"The loop ends on a passing verdict or a retry limit, never on the producer's own opinion.","duration":11.08,"elements":[{"id":"brief","kind":"card","at":[20,45],"title":"Brief","tone":"accent"},{"id":"make","kind":"card","at":[60,45],"title":"Generate"},{"id":"judge","kind":"card","at":[100,45],"title":"Evaluate","subtitle":"against criteria","tone":"warning"},{"id":"ship","kind":"card","at":[140,45],"title":"Ship","tone":"success"},{"id":"e1","kind":"beam","from":"brief","to":"make"},{"id":"e2","kind":"beam","from":"make","to":"judge","label":"draft"},{"id":"e3","kind":"beam","from":"judge","to":"ship","label":"passes"},{"id":"e4","kind":"beam","from":"judge","to":"make","label":"feedback","dash":true}],"beats":[{"do":"settle_in","at":0.2,"targets":["brief"]},{"do":"settle_in","at":0.47,"targets":["make"]},{"do":"settle_in","at":0.74,"targets":["judge"]},{"do":"settle_in","at":1.01,"targets":["ship"]},{"do":"caption","at":0.2,"text":"The loop ends on a passing verdict or a retry limit, never on the producer's own opinion.","secs":1.2},{"do":"connect","at":1.58,"beam":"e1","secs":0.5},{"do":"send","at":2.03,"beam":"e1","secs":0.8},{"do":"caption","at":1.58,"text":"Brief → Generate"},{"do":"connect","at":3.18,"beam":"e2","secs":0.5},{"do":"send","at":3.63,"beam":"e2","label":"draft","secs":0.8},{"do":"caption","at":3.18,"text":"Generate → Evaluate (draft)"},{"do":"connect","at":4.78,"beam":"e3","secs":0.5},{"do":"send","at":5.23,"beam":"e3","label":"passes","secs":0.8},{"do":"caption","at":4.78,"text":"Evaluate → Ship (passes)"},{"do":"caption","at":6.38,"text":"Then back: Evaluate → Generate"},{"do":"connect","at":6.38,"beam":"e4","secs":0.6},{"do":"send","at":6.88,"beam":"e4","label":"feedback","tone":"success","secs":1.1},{"do":"focus","at":8.28,"target":"ship","secs":0.8},{"do":"release","at":9.88,"secs":0.8}]},"transcript":["0.2s: Brief appears","0.2s: The loop ends on a passing verdict or a retry limit, never on the producer's own opinion.","0.5s: Generate appears","0.7s: Evaluate appears","1.0s: Ship appears","1.6s: Brief → Generate connects","1.6s: Brief → Generate","2.0s: a packet travels Brief → Generate","3.2s: Generate → Evaluate connects","3.2s: Generate → Evaluate (draft)","3.6s: “draft” travels Generate → Evaluate","4.8s: Evaluate → Ship connects","4.8s: Evaluate → Ship (passes)","5.2s: “passes” travels Evaluate → Ship","6.4s: Then back: Evaluate → Generate","6.4s: Evaluate → Generate connects","6.9s: “feedback” travels Evaluate → Generate","8.3s: the camera moves in on Ship","9.9s: the camera pulls back"]}},{"id":"agent-human-checkpoint","track":"agents","title":"Human checkpoint","summary":"The model proposes; a person confirms; only then does anything run, and a read-back proves it did. Use it when: An action is hard to undo, costs money, or is outward-facing.","principle":"agents-human","also":["agents-simplest"],"tags":["agents","human-checkpoint"],"evidence":["lib/intent/confirm.ts (proposeVerb, confirmedIntent)","lib/intent/envelope.ts (STAGES)"],"body":{"kind":"motion","plan":{"title":"Human checkpoint: propose, confirm, act, verify","caption":"What runs is what the person saw: the proposal is bound to a digest.","duration":12.95,"elements":[{"id":"ask","kind":"card","at":[16,45],"title":"Request","tone":"accent"},{"id":"propose","kind":"card","at":[48,45],"title":"Propose","subtitle":"a card to read"},{"id":"person","kind":"card","at":[80,45],"title":"Person","subtitle":"reads, confirms","tone":"warning","w":27},{"id":"act","kind":"card","at":[112,45],"title":"Act"},{"id":"verify","kind":"card","at":[144,45],"title":"Read back","tone":"success"},{"id":"e1","kind":"beam","from":"ask","to":"propose"},{"id":"e2","kind":"beam","from":"propose","to":"person","label":"card"},{"id":"e3","kind":"beam","from":"person","to":"act","label":"confirm"},{"id":"e4","kind":"beam","from":"act","to":"verify","label":"result"},{"id":"e5","kind":"beam","from":"person","to":"propose","label":"revise","dash":true}],"beats":[{"do":"settle_in","at":0.2,"targets":["ask"]},{"do":"settle_in","at":0.47,"targets":["propose"]},{"do":"settle_in","at":0.74,"targets":["person"]},{"do":"settle_in","at":1.01,"targets":["act"]},{"do":"settle_in","at":1.28,"targets":["verify"]},{"do":"caption","at":0.2,"text":"What runs is what the person saw: the proposal is bound to a digest.","secs":1.4500000000000002},{"do":"connect","at":1.85,"beam":"e1","secs":0.5},{"do":"send","at":2.3,"beam":"e1","secs":0.8},{"do":"caption","at":1.85,"text":"Request → Propose"},{"do":"connect","at":3.45,"beam":"e2","secs":0.5},{"do":"send","at":3.9,"beam":"e2","label":"card","secs":0.8},{"do":"caption","at":3.45,"text":"Propose → Person (card)"},{"do":"connect","at":5.05,"beam":"e3","secs":0.5},{"do":"send","at":5.5,"beam":"e3","label":"confirm","secs":0.8},{"do":"caption","at":5.05,"text":"Person → Act (confirm)"},{"do":"connect","at":6.65,"beam":"e4","secs":0.5},{"do":"send","at":7.1,"beam":"e4","label":"result","secs":0.8},{"do":"caption","at":6.65,"text":"Act → Read back (result)"},{"do":"caption","at":8.25,"text":"Then back: Person → Propose"},{"do":"connect","at":8.25,"beam":"e5","secs":0.6},{"do":"send","at":8.75,"beam":"e5","label":"revise","tone":"success","secs":1.1},{"do":"focus","at":10.15,"target":"verify","secs":0.8},{"do":"release","at":11.75,"secs":0.8}]},"transcript":["0.2s: Request appears","0.2s: What runs is what the person saw: the proposal is bound to a digest.","0.5s: Propose appears","0.7s: Person appears","1.0s: Act appears","1.3s: Read back appears","1.9s: Request → Propose connects","1.9s: Request → Propose","2.3s: a packet travels Request → Propose","3.5s: Propose → Person connects","3.5s: Propose → Person (card)","3.9s: “card” travels Propose → Person","5.0s: Person → Act connects","5.0s: Person → Act (confirm)","5.5s: “confirm” travels Person → Act","6.7s: Act → Read back connects","6.7s: Act → Read back (result)","7.1s: “result” travels Act → Read back","8.3s: Then back: Person → Propose","8.3s: Person → Propose connects","8.8s: “revise” travels Person → Propose","10.2s: the camera moves in on Read back","11.8s: the camera pulls back"]}},{"id":"agent-memory-loop","track":"agents","title":"Memory and improvement loop","summary":"Before a run, read what earlier runs learned; after it, record the run. Each open lesson gets one decision from a ladder of fixes, and the runs after it judge the decision. Use it when: The same flow, demo or test runs again and again, and you want each run to start from what the last ones found.","principle":"agents-learn","also":["agents-simplest"],"tags":["agents","memory-loop"],"evidence":["lib/memory/improve.ts (introspect, decide, judge, LADDERS)","scripts/flows/improve.ts","scripts/memory/client.mjs (openMemory)"],"body":{"kind":"motion","plan":{"title":"Brief, run, record, decide, judge","caption":"A fix that had no effect is replaced by the next one on its ladder.","duration":12.95,"elements":[{"id":"brief","kind":"card","at":[16,45],"title":"Briefing","subtitle":"lessons so far","tone":"accent"},{"id":"run","kind":"card","at":[48,45],"title":"Run"},{"id":"record","kind":"card","at":[80,45],"title":"Record","subtitle":"steps, times, notes","w":27},{"id":"decide","kind":"card","at":[112,45],"title":"Decide","subtitle":"next fix"},{"id":"judge","kind":"card","at":[144,45],"title":"Judge","subtitle":"runs after it","tone":"success"},{"id":"e1","kind":"beam","from":"brief","to":"run","label":"starts from"},{"id":"e2","kind":"beam","from":"run","to":"record","label":"outcome"},{"id":"e3","kind":"beam","from":"record","to":"decide","label":"lessons"},{"id":"e4","kind":"beam","from":"decide","to":"judge","label":"next runs"},{"id":"e5","kind":"beam","from":"judge","to":"brief","label":"worked or not","dash":true}],"beats":[{"do":"settle_in","at":0.2,"targets":["brief"]},{"do":"settle_in","at":0.47,"targets":["run"]},{"do":"settle_in","at":0.74,"targets":["record"]},{"do":"settle_in","at":1.01,"targets":["decide"]},{"do":"settle_in","at":1.28,"targets":["judge"]},{"do":"caption","at":0.2,"text":"A fix that had no effect is replaced by the next one on its ladder.","secs":1.4500000000000002},{"do":"connect","at":1.85,"beam":"e1","secs":0.5},{"do":"send","at":2.3,"beam":"e1","label":"starts from","secs":0.8},{"do":"caption","at":1.85,"text":"Briefing → Run (starts from)"},{"do":"connect","at":3.45,"beam":"e2","secs":0.5},{"do":"send","at":3.9,"beam":"e2","label":"outcome","secs":0.8},{"do":"caption","at":3.45,"text":"Run → Record (outcome)"},{"do":"connect","at":5.05,"beam":"e3","secs":0.5},{"do":"send","at":5.5,"beam":"e3","label":"lessons","secs":0.8},{"do":"caption","at":5.05,"text":"Record → Decide (lessons)"},{"do":"connect","at":6.65,"beam":"e4","secs":0.5},{"do":"send","at":7.1,"beam":"e4","label":"next runs","secs":0.8},{"do":"caption","at":6.65,"text":"Decide → Judge (next runs)"},{"do":"caption","at":8.25,"text":"Then back: Judge → Briefing"},{"do":"connect","at":8.25,"beam":"e5","secs":0.6},{"do":"send","at":8.75,"beam":"e5","label":"worked or not","tone":"success","secs":1.1},{"do":"focus","at":10.15,"target":"judge","secs":0.8},{"do":"release","at":11.75,"secs":0.8}]},"transcript":["0.2s: Briefing appears","0.2s: A fix that had no effect is replaced by the next one on its ladder.","0.5s: Run appears","0.7s: Record appears","1.0s: Decide appears","1.3s: Judge appears","1.9s: Briefing → Run connects","1.9s: Briefing → Run (starts from)","2.3s: “starts from” travels Briefing → Run","3.5s: Run → Record connects","3.5s: Run → Record (outcome)","3.9s: “outcome” travels Run → Record","5.0s: Record → Decide connects","5.0s: Record → Decide (lessons)","5.5s: “lessons” travels Record → Decide","6.7s: Decide → Judge connects","6.7s: Decide → Judge (next runs)","7.1s: “next runs” travels Decide → Judge","8.3s: Then back: Judge → Briefing","8.3s: Judge → Briefing connects","8.8s: “worked or not” travels Judge → Briefing","10.2s: the camera moves in on Judge","11.8s: the camera pulls back"]}},{"id":"agent-graph-path","track":"agents","title":"Ask the graph, not the model","summary":"To answer how two things connect, load the graph once, search it exactly, and say each hop in words; the model only phrases the answer. Use it when: The question is about structure (what leads to what, what a flow exercises) and the platform already holds the graph.","principle":"agents-checks","also":["agents-simplest"],"tags":["agents","graph-path"],"evidence":["lib/memory/server.ts (platformGraph)","lib/graph-lab/explain.ts (explainPath, neighborhood, reachable)","lib/graph/min-heap.ts (MinHeap)"],"body":{"kind":"motion","plan":{"title":"Load once, search, explain","caption":"No store round trip inside the search: the graph is indexed before it starts.","duration":11.05,"elements":[{"id":"ask","kind":"card","at":[16,45],"title":"Question","tone":"accent"},{"id":"load","kind":"card","at":[48,45],"title":"Load graph","subtitle":"one query, cached","w":27},{"id":"search","kind":"card","at":[80,45],"title":"Search","subtitle":"Dijkstra or A*"},{"id":"explain","kind":"card","at":[112,45],"title":"Explain","subtitle":"a sentence per hop","w":27},{"id":"answer","kind":"card","at":[144,45],"title":"Answer","tone":"success"},{"id":"e1","kind":"beam","from":"ask","to":"load","label":"terms"},{"id":"e2","kind":"beam","from":"load","to":"search","label":"index"},{"id":"e3","kind":"beam","from":"search","to":"explain","label":"path"},{"id":"e4","kind":"beam","from":"explain","to":"answer","label":"hops"}],"beats":[{"do":"settle_in","at":0.2,"targets":["ask"]},{"do":"settle_in","at":0.47,"targets":["load"]},{"do":"settle_in","at":0.74,"targets":["search"]},{"do":"settle_in","at":1.01,"targets":["explain"]},{"do":"settle_in","at":1.28,"targets":["answer"]},{"do":"caption","at":0.2,"text":"No store round trip inside the search: the graph is indexed before it starts.","secs":1.4500000000000002},{"do":"connect","at":1.85,"beam":"e1","secs":0.5},{"do":"send","at":2.3,"beam":"e1","label":"terms","secs":0.8},{"do":"caption","at":1.85,"text":"Question → Load graph (terms)"},{"do":"connect","at":3.45,"beam":"e2","secs":0.5},{"do":"send","at":3.9,"beam":"e2","label":"index","secs":0.8},{"do":"caption","at":3.45,"text":"Load graph → Search (index)"},{"do":"connect","at":5.05,"beam":"e3","secs":0.5},{"do":"send","at":5.5,"beam":"e3","label":"path","secs":0.8},{"do":"caption","at":5.05,"text":"Search → Explain (path)"},{"do":"connect","at":6.65,"beam":"e4","secs":0.5},{"do":"send","at":7.1,"beam":"e4","label":"hops","secs":0.8},{"do":"caption","at":6.65,"text":"Explain → Answer (hops)"},{"do":"focus","at":8.25,"target":"answer","secs":0.8},{"do":"release","at":9.85,"secs":0.8}]},"transcript":["0.2s: Question appears","0.2s: No store round trip inside the search: the graph is indexed before it starts.","0.5s: Load graph appears","0.7s: Search appears","1.0s: Explain appears","1.3s: Answer appears","1.9s: Question → Load graph connects","1.9s: Question → Load graph (terms)","2.3s: “terms” travels Question → Load graph","3.5s: Load graph → Search connects","3.5s: Load graph → Search (index)","3.9s: “index” travels Load graph → Search","5.0s: Search → Explain connects","5.0s: Search → Explain (path)","5.5s: “path” travels Search → Explain","6.7s: Explain → Answer connects","6.7s: Explain → Answer (hops)","7.1s: “hops” travels Explain → Answer","8.3s: the camera moves in on Answer","9.8s: the camera pulls back"]}}]}