{"id":"17-agents","number":17,"slug":"decision-models-in-agents","title":"Decision models inside agents","short":"Inside agents","module":"Real systems","summary":"Agents make dozens of small decisions per task: which tool, which skill, are these arguments grounded, is it time to ask the user, is the task done. Here is where a fast decision model fits in an agent loop, a gate that stops an agent from guessing, what skill selection gained in TypeSafe's test, and real-time control at ten decisions a second.","voice":"Jessica","scenes":[{"template":"title","chapter":"Intro","narration":"Agents are where language models make the most decisions per minute: which tool, which file, ask or act, done or not. Most of those decisions are small. That's where a fast decision model belongs.","params":{"kicker":"Lesson 17","module":"Module 5 · Real systems","title":"Decision models *inside agents*","subtitle":"Let the LLM make the hard calls, and a decider the rote ones.","cast":["mull","snap"]},"start":0.5,"dur":14.287,"words":[{"text":"Agents","s":0.8,"e":1.24},{"text":"are","s":1.28,"e":1.413},{"text":"where","s":1.44,"e":1.584},{"text":"language","s":1.6,"e":2},{"text":"models","s":2.08,"e":2.4},{"text":"make","s":2.48,"e":2.64},{"text":"the","s":2.72,"e":2.8},{"text":"most","s":2.88,"e":3.12},{"text":"decisions","s":3.2,"e":3.68},{"text":"per","s":3.76,"e":3.84},{"text":"minute:","s":3.92,"e":4.64},{"text":"which","s":4.76,"e":4.88},{"text":"tool,","s":4.96,"e":5.44},{"text":"which","s":5.56,"e":5.68},{"text":"file,","s":5.76,"e":6.48},{"text":"ask","s":6.68,"e":6.88},{"text":"or","s":6.96,"e":7.04},{"text":"act,","s":7.12,"e":7.76},{"text":"done","s":7.96,"e":8.16},{"text":"or","s":8.24,"e":8.32},{"text":"not.","s":8.4,"e":9},{"text":"Most","s":9.28,"e":9.52},{"text":"of","s":9.6,"e":9.68},{"text":"those","s":9.76,"e":9.84},{"text":"decisions","s":9.96,"e":10.32},{"text":"are","s":10.36,"e":10.4},{"text":"small.","s":10.48,"e":11.28},{"text":"That's","s":11.4,"e":11.6},{"text":"where","s":11.68,"e":11.76},{"text":"a","s":11.88,"e":12},{"text":"fast","s":12.16,"e":12.32},{"text":"decision","s":12.4,"e":12.72},{"text":"model","s":12.8,"e":13.04},{"text":"belongs.","s":13.32,"e":13.92}]},{"template":"quote","chapter":"Plus, not versus","narration":"TypeSafe's founder is clear that this isn't a rivalry. The future, he says, is not going to be System One models versus LLMs. It's System One models plus code. And for agents, plus the LLM.","params":{"text":"The future is not going to be Jev or System 1 models versus LLMs. We think it's going to be *Jev or System 1 models plus code*.","who":"Diogo Almeida","role":"TypeSafe AI","src":"Runtime 2026","t":413},"start":14.787,"dur":15.239,"words":[{"text":"TypeSafe's","s":15.087,"e":15.647},{"text":"founder","s":15.807,"e":16.127},{"text":"is","s":16.247,"e":16.367},{"text":"clear","s":16.447,"e":16.847},{"text":"that","s":16.927,"e":17.087},{"text":"this","s":17.167,"e":17.407},{"text":"isn't","s":17.487,"e":17.807},{"text":"a","s":17.847,"e":17.887},{"text":"rivalry.","s":17.967,"e":18.927},{"text":"The","s":19.007,"e":19.087},{"text":"future,","s":19.167,"e":19.647},{"text":"he","s":19.727,"e":19.807},{"text":"says,","s":19.887,"e":20.367},{"text":"is","s":20.487,"e":20.607},{"text":"not","s":20.727,"e":20.847},{"text":"going","s":20.927,"e":21.087},{"text":"to","s":21.127,"e":21.167},{"text":"be","s":21.207,"e":21.247},{"text":"System","s":21.407,"e":21.727},{"text":"One","s":21.807,"e":21.967},{"text":"models","s":22.167,"e":22.367},{"text":"versus","s":22.527,"e":22.847},{"text":"LLMs.","s":23.007,"e":24.047},{"text":"It's","s":24.127,"e":24.287},{"text":"System","s":24.447,"e":24.607},{"text":"One","s":24.687,"e":24.847},{"text":"models","s":24.927,"e":25.327},{"text":"plus","s":25.567,"e":25.967},{"text":"code.","s":26.047,"e":26.847},{"text":"And","s":26.927,"e":27.007},{"text":"for","s":27.087,"e":27.167},{"text":"agents,","s":27.447,"e":27.967},{"text":"plus","s":28.167,"e":28.367},{"text":"the","s":28.447,"e":28.527},{"text":"LLM.","s":28.607,"e":29.407}]},{"template":"systems","chapter":"Where it fits","narration":"AWS built Strands Decider for exactly this. Its README lists the spots: route each task to the right model. Pick the next tool. Check a tool call's arguments before it runs. Triage, guardrails, cheap evaluations. And hybrid agents, where the LLM makes the hard decisions and a decider makes the rote ones.","params":{"title":"Rote decisions inside an agent loop","cols":[{"who":"snap","title":"Before acting","sub":"decider","items":["Which model for this task?","Which tool or skill next?","Are the arguments grounded?"]},{"who":"mull","title":"The hard part","sub":"the LLM","items":["Plan the approach","Write the code or reply","Recover from surprises"]},{"who":"snap","title":"After acting","sub":"decider","items":["Did the step succeed?","Is the task done?","Should a person look?"],"react":{"at":"rote ones","mood":"sure"}}]},"start":30.026,"dur":22.501,"words":[{"text":"AWS","s":30.326,"e":31.126},{"text":"built","s":31.206,"e":31.446},{"text":"Strands","s":31.526,"e":31.846},{"text":"Decider","s":31.926,"e":32.486},{"text":"for","s":32.566,"e":32.646},{"text":"exactly","s":32.726,"e":33.366},{"text":"this.","s":33.446,"e":34.006},{"text":"Its","s":34.166,"e":34.326},{"text":"README","s":34.406,"e":34.726},{"text":"lists","s":34.806,"e":35.046},{"text":"the","s":35.086,"e":35.126},{"text":"spots:","s":35.206,"e":36.166},{"text":"route","s":36.246,"e":36.486},{"text":"each","s":36.566,"e":36.726},{"text":"task","s":36.806,"e":37.206},{"text":"to","s":37.286,"e":37.366},{"text":"the","s":37.406,"e":37.446},{"text":"right","s":37.526,"e":37.686},{"text":"model.","s":37.766,"e":38.166},{"text":"Pick","s":38.566,"e":38.726},{"text":"the","s":38.766,"e":38.806},{"text":"next","s":38.886,"e":39.046},{"text":"tool.","s":39.126,"e":39.686},{"text":"Check","s":39.926,"e":40.086},{"text":"a","s":40.126,"e":40.166},{"text":"tool","s":40.246,"e":40.406},{"text":"call's","s":40.486,"e":40.806},{"text":"arguments","s":41.086,"e":41.366},{"text":"before","s":41.446,"e":41.686},{"text":"it","s":41.726,"e":41.766},{"text":"runs.","s":41.846,"e":42.406},{"text":"Triage,","s":42.806,"e":43.566},{"text":"guardrails,","s":43.686,"e":44.566},{"text":"cheap","s":44.646,"e":44.806},{"text":"evaluations.","s":44.886,"e":45.846},{"text":"And","s":46.246,"e":46.406},{"text":"hybrid","s":46.486,"e":46.806},{"text":"agents,","s":46.886,"e":47.526},{"text":"where","s":47.606,"e":47.686},{"text":"the","s":47.726,"e":47.766},{"text":"LLM","s":47.926,"e":48.326},{"text":"makes","s":48.406,"e":48.566},{"text":"the","s":48.646,"e":48.726},{"text":"hard","s":48.806,"e":48.966},{"text":"decisions","s":49.046,"e":49.606},{"text":"and","s":49.766,"e":49.846},{"text":"a","s":49.886,"e":49.926},{"text":"decider","s":50.046,"e":50.486},{"text":"makes","s":50.566,"e":50.806},{"text":"the","s":50.846,"e":50.886},{"text":"rote","s":50.966,"e":51.126},{"text":"ones.","s":51.206,"e":51.926}]},{"template":"code","chapter":"A gate before tools","narration":"Here's the Strands example. The agent has a weather tool, and an eager system prompt. A user asks: what's the weather? No city. The agent guesses one and calls the tool. But before the call runs, a hook asks the decider two narrow questions. Are the argument values grounded in facts the user actually gave? Is it premature to call this tool before clarifying? A few lines of Python, and the agent goes back and asks which city.","params":{"file":"weather_gate.py","lang":"py","lines":["class GroundingGate(InterventionHandler):","    def before_tool_call(self, call, conversation):","        a = decider.ask(","            state={\"conversation\": conversation, \"call\": call},","            questions={","                \"grounded\": Noul(\"Are the argument values grounded \"","                                 \"in facts the user provided?\"),","                \"premature\": Noul(\"Is it premature to call this tool \"","                                  \"before clarifying with the user?\"),","            })","        if a[\"grounded\"] < 0.5 or a[\"premature\"] > 0.5:","            return Guide(\"Ask the user which city they mean.\")","        return Proceed()"],"hl":[{"from":6,"to":9,"label":"two narrow questions","tone":"agent","at":"two narrow questions"},{"from":11,"to":12,"label":"guide, don't refuse","tone":"good","at":"asks which city"}],"caption":"Adapted from strands-decider/examples/strands. `Guide` hands the turn back with feedback instead of failing.","caption_at":"A few lines"},"start":52.527,"dur":28.979,"words":[{"text":"Here's","s":52.827,"e":53.147},{"text":"the","s":53.187,"e":53.227},{"text":"Strands","s":53.307,"e":53.707},{"text":"example.","s":53.987,"e":54.547},{"text":"The","s":54.827,"e":54.907},{"text":"agent","s":54.987,"e":55.307},{"text":"has","s":55.387,"e":55.467},{"text":"a","s":55.507,"e":55.547},{"text":"weather","s":55.627,"e":55.867},{"text":"tool,","s":55.947,"e":56.347},{"text":"and","s":56.427,"e":56.587},{"text":"an","s":56.667,"e":56.747},{"text":"eager","s":56.907,"e":57.147},{"text":"system","s":57.307,"e":57.547},{"text":"prompt.","s":57.627,"e":58.267},{"text":"A","s":58.507,"e":58.547},{"text":"user","s":58.587,"e":58.827},{"text":"asks:","s":58.907,"e":59.507},{"text":"what's","s":59.627,"e":59.787},{"text":"the","s":59.827,"e":59.867},{"text":"weather?","s":59.947,"e":60.347},{"text":"No","s":60.747,"e":60.907},{"text":"city.","s":61.067,"e":61.627},{"text":"The","s":61.867,"e":61.947},{"text":"agent","s":62.027,"e":62.267},{"text":"guesses","s":62.347,"e":62.747},{"text":"one","s":62.827,"e":63.067},{"text":"and","s":63.147,"e":63.227},{"text":"calls","s":63.307,"e":63.547},{"text":"the","s":63.587,"e":63.627},{"text":"tool.","s":63.707,"e":64.267},{"text":"But","s":64.507,"e":64.587},{"text":"before","s":64.667,"e":64.987},{"text":"the","s":65.027,"e":65.067},{"text":"call","s":65.147,"e":65.387},{"text":"runs,","s":65.467,"e":66.027},{"text":"a","s":66.067,"e":66.107},{"text":"hook","s":66.187,"e":66.427},{"text":"asks","s":66.507,"e":66.827},{"text":"the","s":66.867,"e":66.907},{"text":"decider","s":66.987,"e":67.467},{"text":"two","s":67.627,"e":67.867},{"text":"narrow","s":68.027,"e":68.267},{"text":"questions.","s":68.347,"e":68.987},{"text":"Are","s":69.467,"e":69.627},{"text":"the","s":69.667,"e":69.707},{"text":"argument","s":69.787,"e":70.107},{"text":"values","s":70.187,"e":70.587},{"text":"grounded","s":70.667,"e":70.987},{"text":"in","s":71.067,"e":71.147},{"text":"facts","s":71.307,"e":71.627},{"text":"the","s":71.707,"e":71.787},{"text":"user","s":71.947,"e":72.107},{"text":"actually","s":72.187,"e":72.667},{"text":"gave?","s":72.747,"e":73.387},{"text":"Is","s":73.627,"e":73.707},{"text":"it","s":73.787,"e":73.867},{"text":"premature","s":73.947,"e":74.507},{"text":"to","s":74.547,"e":74.587},{"text":"call","s":74.667,"e":74.827},{"text":"this","s":74.907,"e":74.987},{"text":"tool","s":75.067,"e":75.307},{"text":"before","s":75.467,"e":75.627},{"text":"clarifying?","s":75.707,"e":76.427},{"text":"A","s":76.987,"e":77.067},{"text":"few","s":77.147,"e":77.227},{"text":"lines","s":77.307,"e":77.467},{"text":"of","s":77.507,"e":77.547},{"text":"Python,","s":77.627,"e":78.187},{"text":"and","s":78.227,"e":78.267},{"text":"the","s":78.347,"e":78.387},{"text":"agent","s":78.427,"e":78.667},{"text":"goes","s":78.747,"e":78.907},{"text":"back","s":78.987,"e":79.227},{"text":"and","s":79.307,"e":79.387},{"text":"asks","s":79.467,"e":79.867},{"text":"which","s":79.947,"e":80.187},{"text":"city.","s":80.267,"e":80.907}]},{"template":"chart","chapter":"Pick the right skill","narration":"Skill selection is another big one. Agents usually stuff every skill description into the prompt and hope. TypeSafe tested an agent with a hundred eighty two skills. On its own, it loaded the wrong skill for sixteen point eight percent of requests that had a matching skill. With a decider ranking skills first, then rechecking the top three with their full text, that fell to seven point three percent. Needless loads fell from nine point eight to four.","params":{"title":"182 skills: how often the agent loaded a skill wrongly","kind":"bar","ymax":0.21,"data":[{"x":"wrong skill, agent alone","y":0.168,"label":"16.8%","tone":"bad","at":"sixteen point eight"},{"x":"wrong skill, with decider","y":0.073,"label":"7.3%","hl":true,"at":"seven point three"},{"x":"needless load, agent alone","y":0.098,"label":"9.8%","tone":"bad","at":"Needless loads"},{"x":"needless load, with decider","y":0.04,"label":"4.0%","hl":true,"at":"to four"}],"src":"TypeSafe cookbook: Skill suggestion (Nous Research's Hermes catalog), two requests per turn"},"start":81.506,"dur":29.319,"words":[{"text":"Skill","s":81.806,"e":82.126},{"text":"selection","s":82.206,"e":82.686},{"text":"is","s":82.766,"e":82.926},{"text":"another","s":83.166,"e":83.406},{"text":"big","s":83.486,"e":83.646},{"text":"one.","s":83.726,"e":84.206},{"text":"Agents","s":84.446,"e":84.846},{"text":"usually","s":85.046,"e":85.246},{"text":"stuff","s":85.446,"e":85.646},{"text":"every","s":85.726,"e":86.046},{"text":"skill","s":86.126,"e":86.366},{"text":"description","s":86.446,"e":86.926},{"text":"into","s":87.046,"e":87.166},{"text":"the","s":87.206,"e":87.246},{"text":"prompt","s":87.326,"e":87.726},{"text":"and","s":87.886,"e":88.206},{"text":"hope.","s":88.366,"e":89.046},{"text":"TypeSafe","s":89.326,"e":89.806},{"text":"tested","s":89.966,"e":90.126},{"text":"an","s":90.206,"e":90.286},{"text":"agent","s":90.366,"e":90.606},{"text":"with","s":90.686,"e":90.766},{"text":"a","s":90.846,"e":91.006},{"text":"hundred","s":91.046,"e":91.326},{"text":"eighty","s":91.566,"e":91.806},{"text":"two","s":91.886,"e":92.046},{"text":"skills.","s":92.206,"e":92.766},{"text":"On","s":93.166,"e":93.246},{"text":"its","s":93.326,"e":93.406},{"text":"own,","s":93.486,"e":93.886},{"text":"it","s":93.966,"e":94.046},{"text":"loaded","s":94.126,"e":94.366},{"text":"the","s":94.406,"e":94.446},{"text":"wrong","s":94.606,"e":94.846},{"text":"skill","s":94.926,"e":95.246},{"text":"for","s":95.326,"e":95.566},{"text":"sixteen","s":95.646,"e":96.046},{"text":"point","s":96.206,"e":96.446},{"text":"eight","s":96.526,"e":96.606},{"text":"percent","s":96.686,"e":97.006},{"text":"of","s":97.046,"e":97.086},{"text":"requests","s":97.366,"e":97.646},{"text":"that","s":97.726,"e":97.806},{"text":"had","s":97.886,"e":97.966},{"text":"a","s":98.006,"e":98.046},{"text":"matching","s":98.206,"e":98.366},{"text":"skill.","s":98.446,"e":98.846},{"text":"With","s":99.326,"e":99.406},{"text":"a","s":99.446,"e":99.486},{"text":"decider","s":99.566,"e":100.046},{"text":"ranking","s":100.206,"e":100.366},{"text":"skills","s":100.446,"e":100.766},{"text":"first,","s":100.846,"e":101.566},{"text":"then","s":101.646,"e":101.886},{"text":"rechecking","s":101.966,"e":102.366},{"text":"the","s":102.446,"e":102.526},{"text":"top","s":102.646,"e":102.766},{"text":"three","s":102.846,"e":103.006},{"text":"with","s":103.086,"e":103.166},{"text":"their","s":103.246,"e":103.326},{"text":"full","s":103.406,"e":103.566},{"text":"text,","s":103.646,"e":104.446},{"text":"that","s":104.566,"e":104.686},{"text":"fell","s":104.766,"e":104.926},{"text":"to","s":105.006,"e":105.166},{"text":"seven","s":105.246,"e":105.486},{"text":"point","s":105.566,"e":105.886},{"text":"three","s":105.966,"e":106.046},{"text":"percent.","s":106.206,"e":106.686},{"text":"Needless","s":107.086,"e":107.406},{"text":"loads","s":107.486,"e":107.886},{"text":"fell","s":107.966,"e":108.126},{"text":"from","s":108.206,"e":108.366},{"text":"nine","s":108.446,"e":108.606},{"text":"point","s":108.686,"e":108.926},{"text":"eight","s":109.006,"e":109.086},{"text":"to","s":109.326,"e":109.566},{"text":"four.","s":109.726,"e":110.126}]},{"template":"statement","chapter":"Ask the decider","narration":"You can also hand the agent the decision model as a tool. Developer IndyDevDan gave his coding agent an ask Jev tool for yes or no and classification questions about files. The agent stopped reading whole files into its expensive context just to answer a simple question. His words: we delegated a QA task for file reading outside of my expensive language model to Jev.","params":{"eyebrow":"IndyDevDan, “10 Levels of Jev For Agentic Engineers”","text":"We delegated a QA task for file reading *outside of my expensive language model* to Jev.","art":"bot","tone":"s2","punch":"outside of my expensive"},"start":110.825,"dur":25.949,"words":[{"text":"You","s":111.125,"e":111.205},{"text":"can","s":111.285,"e":111.365},{"text":"also","s":111.445,"e":111.685},{"text":"hand","s":111.845,"e":112.005},{"text":"the","s":112.085,"e":112.165},{"text":"agent","s":112.245,"e":112.485},{"text":"the","s":112.525,"e":112.565},{"text":"decision","s":112.645,"e":113.045},{"text":"model","s":113.125,"e":113.365},{"text":"as","s":113.445,"e":113.525},{"text":"a","s":113.605,"e":113.685},{"text":"tool.","s":113.885,"e":114.165},{"text":"Developer","s":114.645,"e":115.125},{"text":"IndyDevDan","s":115.285,"e":116.165},{"text":"gave","s":116.325,"e":116.485},{"text":"his","s":116.565,"e":116.645},{"text":"coding","s":116.725,"e":116.965},{"text":"agent","s":117.045,"e":117.365},{"text":"an","s":117.445,"e":117.605},{"text":"ask","s":117.685,"e":118.005},{"text":"Jev","s":118.085,"e":118.405},{"text":"tool","s":118.485,"e":118.725},{"text":"for","s":118.805,"e":118.965},{"text":"yes","s":119.125,"e":119.285},{"text":"or","s":119.365,"e":119.445},{"text":"no","s":119.525,"e":119.765},{"text":"and","s":119.925,"e":120.085},{"text":"classification","s":120.165,"e":120.885},{"text":"questions","s":120.965,"e":121.365},{"text":"about","s":121.485,"e":121.605},{"text":"files.","s":121.685,"e":122.245},{"text":"The","s":122.805,"e":122.885},{"text":"agent","s":122.965,"e":123.285},{"text":"stopped","s":123.365,"e":123.685},{"text":"reading","s":123.765,"e":124.085},{"text":"whole","s":124.165,"e":124.405},{"text":"files","s":124.565,"e":124.965},{"text":"into","s":125.085,"e":125.205},{"text":"its","s":125.285,"e":125.365},{"text":"expensive","s":125.525,"e":126.005},{"text":"context","s":126.085,"e":126.725},{"text":"just","s":126.965,"e":127.125},{"text":"to","s":127.205,"e":127.285},{"text":"answer","s":127.445,"e":127.605},{"text":"a","s":127.685,"e":127.765},{"text":"simple","s":127.925,"e":128.085},{"text":"question.","s":128.165,"e":128.805},{"text":"His","s":129.285,"e":129.445},{"text":"words:","s":129.645,"e":129.925},{"text":"we","s":130.325,"e":130.405},{"text":"delegated","s":130.485,"e":130.965},{"text":"a","s":131.045,"e":131.125},{"text":"QA","s":131.205,"e":131.605},{"text":"task","s":131.685,"e":132.005},{"text":"for","s":132.085,"e":132.165},{"text":"file","s":132.245,"e":132.565},{"text":"reading","s":132.645,"e":132.965},{"text":"outside","s":133.045,"e":133.525},{"text":"of","s":133.605,"e":133.685},{"text":"my","s":133.725,"e":133.765},{"text":"expensive","s":133.845,"e":134.405},{"text":"language","s":134.485,"e":134.805},{"text":"model","s":134.885,"e":135.125},{"text":"to","s":135.285,"e":135.445},{"text":"Jev.","s":135.525,"e":136.165}]},{"template":"stat","chapter":"Real time","narration":"And speed opens a new kind of agent: one that acts in real time. TypeSafe's demo plays Doom at ten decisions a second, which costs about seven dollars an hour. Opper's Pac-Man benchmark gives each decision a two second deadline: answer late, and a simple backup rule moves instead.","params":{"items":[{"value":10,"suffix":"/s","label":"decisions per second in TypeSafe's Doom demo","tone":"agent","at":"ten decisions a second"},{"value":7,"prefix":"~$","suffix":"/h","label":"the cost of running it","tone":"good","at":"seven dollars an hour"},{"value":2,"suffix":" s","label":"deadline in Opper's JevMan, then a backup rule","tone":"s2","at":"two second deadline"}],"src":"TypeSafe launch post; Opper AI, JevMan benchmark","punch":false},"start":136.774,"dur":19.392,"words":[{"text":"And","s":137.074,"e":137.207},{"text":"speed","s":137.234,"e":137.634},{"text":"opens","s":137.714,"e":138.05},{"text":"a","s":138.114,"e":138.194},{"text":"new","s":138.434,"e":138.594},{"text":"kind","s":138.674,"e":138.834},{"text":"of","s":138.874,"e":138.914},{"text":"agent:","s":138.994,"e":139.794},{"text":"one","s":139.874,"e":139.954},{"text":"that","s":140.034,"e":140.194},{"text":"acts","s":140.274,"e":140.514},{"text":"in","s":140.594,"e":140.754},{"text":"real","s":140.834,"e":141.074},{"text":"time.","s":141.154,"e":142.034},{"text":"TypeSafe's","s":142.154,"e":142.594},{"text":"demo","s":142.754,"e":142.914},{"text":"plays","s":142.994,"e":143.234},{"text":"Doom","s":143.394,"e":143.634},{"text":"at","s":143.714,"e":143.874},{"text":"ten","s":143.954,"e":144.194},{"text":"decisions","s":144.314,"e":144.674},{"text":"a","s":144.754,"e":144.834},{"text":"second,","s":144.914,"e":145.474},{"text":"which","s":145.594,"e":145.714},{"text":"costs","s":145.834,"e":145.994},{"text":"about","s":146.034,"e":146.354},{"text":"seven","s":146.474,"e":146.594},{"text":"dollars","s":146.674,"e":146.994},{"text":"an","s":147.034,"e":147.074},{"text":"hour.","s":147.154,"e":147.874},{"text":"Opper's","s":147.914,"e":148.354},{"text":"Pac-Man","s":148.434,"e":148.834},{"text":"benchmark","s":148.914,"e":149.394},{"text":"gives","s":149.434,"e":149.714},{"text":"each","s":149.834,"e":149.954},{"text":"decision","s":150.194,"e":150.434},{"text":"a","s":150.514,"e":150.594},{"text":"two","s":150.674,"e":150.834},{"text":"second","s":150.914,"e":151.234},{"text":"deadline:","s":151.474,"e":152.114},{"text":"answer","s":152.194,"e":152.434},{"text":"late,","s":152.514,"e":152.994},{"text":"and","s":153.114,"e":153.234},{"text":"a","s":153.314,"e":153.394},{"text":"simple","s":153.474,"e":153.714},{"text":"backup","s":153.794,"e":154.114},{"text":"rule","s":154.194,"e":154.434},{"text":"moves","s":154.514,"e":154.754},{"text":"instead.","s":155.034,"e":155.554}]},{"template":"compare","chapter":"Workflow or agent?","narration":"Finally, step back. Anthropic separates workflows, where code defines the paths, from agents, where the LLM decides its own steps. A decision model makes workflows far more capable, because every node can now judge meaning. So before you build an agent, ask: could this be a workflow with smart nodes? If you can map the decision tree, it should be.","params":{"left":{"title":"Workflow + decision model","who":"curly","tone":"good","items":[{"text":"Code defines the paths","at":"code defines the paths"},{"text":"Each node judges meaning, fast"},{"text":"Predictable, testable, cheap"}]},"right":{"title":"Agent","who":"mull","tone":"s2","items":[{"text":"The LLM decides its own steps","at":"decides its own steps"},{"text":"For open-ended tasks"},{"text":"Use deciders for its rote calls"}]},"vs":"or"},"start":156.166,"dur":24.512,"words":[{"text":"Finally,","s":156.466,"e":157.426},{"text":"step","s":157.506,"e":157.746},{"text":"back.","s":157.906,"e":158.586},{"text":"Anthropic","s":158.866,"e":159.426},{"text":"separates","s":159.506,"e":159.986},{"text":"workflows,","s":160.146,"e":160.866},{"text":"where","s":160.986,"e":161.106},{"text":"code","s":161.186,"e":161.426},{"text":"defines","s":161.506,"e":161.826},{"text":"the","s":161.906,"e":161.946},{"text":"paths,","s":161.986,"e":162.626},{"text":"from","s":162.706,"e":162.946},{"text":"agents,","s":163.266,"e":163.746},{"text":"where","s":163.826,"e":163.906},{"text":"the","s":163.986,"e":164.066},{"text":"LLM","s":164.146,"e":164.546},{"text":"decides","s":164.626,"e":164.946},{"text":"its","s":165.026,"e":165.186},{"text":"own","s":165.266,"e":165.426},{"text":"steps.","s":165.506,"e":166.466},{"text":"A","s":166.506,"e":166.546},{"text":"decision","s":166.746,"e":166.946},{"text":"model","s":167.026,"e":167.346},{"text":"makes","s":167.466,"e":167.586},{"text":"workflows","s":167.666,"e":168.226},{"text":"far","s":168.306,"e":168.466},{"text":"more","s":168.546,"e":168.706},{"text":"capable,","s":168.786,"e":169.426},{"text":"because","s":169.626,"e":169.826},{"text":"every","s":169.906,"e":170.146},{"text":"node","s":170.226,"e":170.466},{"text":"can","s":170.546,"e":170.706},{"text":"now","s":170.786,"e":170.866},{"text":"judge","s":170.946,"e":171.186},{"text":"meaning.","s":171.266,"e":172.226},{"text":"So","s":172.386,"e":172.546},{"text":"before","s":172.706,"e":172.866},{"text":"you","s":172.946,"e":173.026},{"text":"build","s":173.106,"e":173.186},{"text":"an","s":173.266,"e":173.346},{"text":"agent,","s":173.426,"e":174.066},{"text":"ask:","s":174.146,"e":174.946},{"text":"could","s":175.026,"e":175.106},{"text":"this","s":175.186,"e":175.266},{"text":"be","s":175.346,"e":175.426},{"text":"a","s":175.506,"e":175.586},{"text":"workflow","s":175.826,"e":176.066},{"text":"with","s":176.146,"e":176.226},{"text":"smart","s":176.306,"e":176.546},{"text":"nodes?","s":176.626,"e":177.346},{"text":"If","s":177.426,"e":177.506},{"text":"you","s":177.546,"e":177.586},{"text":"can","s":177.666,"e":177.746},{"text":"map","s":177.826,"e":177.986},{"text":"the","s":178.026,"e":178.066},{"text":"decision","s":178.146,"e":178.546},{"text":"tree,","s":178.626,"e":179.186},{"text":"it","s":179.266,"e":179.346},{"text":"should","s":179.466,"e":179.586},{"text":"be.","s":179.706,"e":180.066}]},{"template":"quiz","chapter":"Quick check","narration":"Quick check. Your agent sometimes calls a payment tool with an amount the user never mentioned. What's the best fix with a decision model?","params":{"q":"An agent calls a payment tool with an **amount the user never said**. Best fix?","options":["Tell the agent in the prompt to be careful","A before-tool-call gate: “Is the amount grounded in what the user said?” → guide it back to ask","Ask the decider to choose the amount","Lower the model temperature"],"answer":1,"explain":"A narrow grounding question before the call catches invented arguments, and guiding the agent back makes it ask the user instead of guessing."},"start":180.678,"dur":13.938,"words":[{"text":"Quick","s":180.978,"e":181.218},{"text":"check.","s":181.298,"e":181.818},{"text":"Your","s":182.018,"e":182.178},{"text":"agent","s":182.258,"e":182.578},{"text":"sometimes","s":182.658,"e":183.058},{"text":"calls","s":183.138,"e":183.298},{"text":"a","s":183.378,"e":183.458},{"text":"payment","s":183.658,"e":183.858},{"text":"tool","s":183.938,"e":184.178},{"text":"with","s":184.258,"e":184.418},{"text":"an","s":184.458,"e":184.498},{"text":"amount","s":184.698,"e":184.898},{"text":"the","s":184.938,"e":184.978},{"text":"user","s":185.138,"e":185.378},{"text":"never","s":185.618,"e":185.858},{"text":"mentioned.","s":185.938,"e":186.738},{"text":"What's","s":186.978,"e":187.218},{"text":"the","s":187.258,"e":187.298},{"text":"best","s":187.458,"e":187.698},{"text":"fix","s":187.778,"e":188.098},{"text":"with","s":188.178,"e":188.258},{"text":"a","s":188.298,"e":188.338},{"text":"decision","s":188.538,"e":188.738},{"text":"model?","s":188.818,"e":189.458}]},{"template":"exercise","chapter":"Try it","narration":"Try it. Have your agent add a decision model gate to its own tool calls.","params":{"title":"Gate your tools","intro":"Paste this into your coding agent (works best on an agent you are building):","prompt":"In our agent, add a hook that runs before every tool call. It sends the\nconversation and the proposed call to a decision model with narrow\nquestions: are the argument values grounded in what the user said? is\nit premature to act before clarifying? is this tool appropriate for the\nrequest? If any check fails, hand the turn back to the agent with\nspecific feedback instead of failing. Log the probabilities, and add a\ntest where the user omits a required detail."},"start":194.616,"dur":5.548,"words":[{"text":"Try","s":194.916,"e":195.156},{"text":"it.","s":195.236,"e":195.476},{"text":"Have","s":195.796,"e":195.956},{"text":"your","s":196.036,"e":196.116},{"text":"agent","s":196.276,"e":196.436},{"text":"add","s":196.516,"e":196.676},{"text":"a","s":196.716,"e":196.756},{"text":"decision","s":196.996,"e":197.236},{"text":"model","s":197.316,"e":197.476},{"text":"gate","s":197.556,"e":197.796},{"text":"to","s":197.836,"e":197.876},{"text":"its","s":197.956,"e":198.196},{"text":"own","s":198.276,"e":198.436},{"text":"tool","s":198.516,"e":198.756},{"text":"calls.","s":198.836,"e":199.556}]},{"template":"recap","chapter":"Recap","narration":"So: decision models go inside agents, not instead of them. Route, pick tools and skills, check arguments, decide when it's done. Gate risky calls and guide the agent back. And when you can map the decision tree, build a workflow with smart nodes. That's module five's first half. Next: turning judgments into data.","params":{"items":["System One plus code plus the LLM, not versus.","Deciders take the rote calls: route, tool, skill, done?","Gate tool calls on grounded arguments; guide, don't refuse.","Mappable decision tree? Build a workflow with smart nodes."],"next":"Judgments as data","next_at":"Next"},"start":200.164,"dur":24.417,"words":[{"text":"So:","s":200.464,"e":200.984},{"text":"decision","s":201.184,"e":201.584},{"text":"models","s":201.664,"e":201.984},{"text":"go","s":202.064,"e":202.304},{"text":"inside","s":202.384,"e":202.864},{"text":"agents,","s":202.944,"e":203.584},{"text":"not","s":203.664,"e":203.904},{"text":"instead","s":204.144,"e":204.384},{"text":"of","s":204.424,"e":204.464},{"text":"them.","s":204.544,"e":205.264},{"text":"Route,","s":205.344,"e":205.984},{"text":"pick","s":206.064,"e":206.224},{"text":"tools","s":206.304,"e":206.544},{"text":"and","s":206.584,"e":206.624},{"text":"skills,","s":206.704,"e":207.504},{"text":"check","s":207.584,"e":207.824},{"text":"arguments,","s":207.904,"e":208.784},{"text":"decide","s":208.944,"e":209.264},{"text":"when","s":209.344,"e":209.424},{"text":"it's","s":209.504,"e":209.664},{"text":"done.","s":209.824,"e":210.464},{"text":"Gate","s":210.544,"e":210.784},{"text":"risky","s":210.864,"e":211.104},{"text":"calls","s":211.184,"e":211.664},{"text":"and","s":211.744,"e":211.824},{"text":"guide","s":211.904,"e":212.144},{"text":"the","s":212.184,"e":212.224},{"text":"agent","s":212.304,"e":212.624},{"text":"back.","s":212.704,"e":213.424},{"text":"And","s":213.504,"e":213.584},{"text":"when","s":213.664,"e":213.744},{"text":"you","s":213.784,"e":213.824},{"text":"can","s":213.904,"e":214.064},{"text":"map","s":214.184,"e":214.304},{"text":"the","s":214.344,"e":214.384},{"text":"decision","s":214.624,"e":214.864},{"text":"tree,","s":214.944,"e":215.504},{"text":"build","s":215.624,"e":215.744},{"text":"a","s":215.784,"e":215.824},{"text":"workflow","s":215.904,"e":216.304},{"text":"with","s":216.384,"e":216.464},{"text":"smart","s":216.544,"e":216.864},{"text":"nodes.","s":216.944,"e":217.744},{"text":"That's","s":217.824,"e":217.984},{"text":"module","s":218.064,"e":218.384},{"text":"five's","s":218.464,"e":218.864},{"text":"first","s":219.024,"e":219.184},{"text":"half.","s":219.384,"e":220.064},{"text":"Next:","s":220.144,"e":220.944},{"text":"turning","s":221.064,"e":221.264},{"text":"judgments","s":221.424,"e":221.904},{"text":"into","s":221.984,"e":222.224},{"text":"data.","s":222.304,"e":223.024}]}],"total":224.981,"audio":"/audio/17-agents.mp3"}