CourseAI System Design: The Complete Course · Module 8: Orchestration and State · part 54 of 107
Part 54 · Module 8: Orchestration and State

Lesson 1: Control flow: who decides the next step

31 min read·
Module 8 · Lesson 1 · About 55 minutes · Needs: Module 4 lesson 3 (the model port and ask_flow.py), Module 3 (cost per request). One optional hosted call; everything else uses a scripted stand-in

The situation

Week 8. Ask is one straight function. Joel wants two-part answers, action requests handed to Cases and bank details never touched. A teammate proposes making Ask an agent that decides its own steps. Gareth asks: "why not a workflow?"

The running example: four messages from t-tallis-u009, at Tallis Retail Group. "How many days of annual leave do I get?" (30, says the 2026 policy). "How many days of annual leave do I get, and when is pay day?" (the 25th). "My laptop screen is cracked. Please order me a new one." "Please change my bank details to my new account."

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan