Breaking a task into steps on the AI Agents track. Planning is writing the steps before acting, then updating the plan when a step fails. A plan is a list of checks, not a wish. 'Solve the customer's problem' is not a step. 'Confirm the order id exists' is a step.
This lesson assumes you already worked through Short memory and long memory.
The idea in practice
Ask the model for a plan as structured steps with a done condition on each. Execute one step at a time. If a step fails, revise only the remaining plan. Do not hide the plan from logs.
A concrete check
goal = {
'track': 'AI Agents',
'lesson': 'Breaking a task into steps',
}
checks = [
'input available at decision time',
'score matches the real decision',
'failure case written down',
]
print(goal['lesson'])
for item in checks:
print('-', item)
Run the sketch locally if you have Python. The printout is a reminder of the checks, not a trained model. Replace the strings with the real inputs from your own example before you treat it as a design.
What usually goes wrong
Letting the model improvise every step with no written plan makes failures impossible to replay. When this happens, stop adding parameters or tools. Fix the check, the data, or the permission, then run the same example again.
What to write down
- The input you are allowed to use at decision time.
- The output and the score or pass rule.
- One failure you will test on purpose.
- What you will not claim the system can do.
Practice
Turn 'prepare a weekly sales note' into six steps, each with a done condition you could test.
Self-check
- Say Breaking a task into steps in one sentence that mentions an input and an output.
- Name the failure mode in this lesson and the check that would catch it.
Done when: you can explain this lesson without the page open, and you have a written failure case.