Lesson 1 of 8 · 8 min read · last verified 2026-10-15
Who decides the next step
In this lesson you will:
- Tell a workflow from an agent by asking who decides the next step
- Place a given system on the spectrum between them and say what that placement costs
P5 built chains: a trigger, some steps, an action. Every step in them was placed by a person, in advance, in a fixed order. The model did a job at one position and the path was never in doubt.
This module is about what happens when you remove that last certainty. You hand the model not just a task but the choice of what to do next.
One question
Who decides the next step?
If you did, when you drew the chain, it is a workflow. The order is fixed and you can read it before anything runs.
If the model does, at run time, from whatever it has seen so far, it is an agent. The order is whatever it turns out to be.
Everything else people say about agents is a consequence of that. Autonomy, flexibility, the occasional startling failure: all follow from the path having moved out of your hands and into a system that decides it fresh each time.
It is a spectrum, not a switch
Real systems sit between the two, and it helps to see where.
Fixed path. Every step and its order are yours. The model fills in content at set positions. A support triage chain.
Fixed path with a branch the model picks. You wrote three routes; the model chooses which one applies. The routes are still yours.
A loop with a short list of tools. The model decides what to call next and when to stop, but the list of things it can call is small and yours.
Open-ended. The model plans, picks from many tools, and can revise its plan. You describe a goal.
Each step right gives up some predictability for some flexibility. Neither is better. They suit different jobs, and the skill is in choosing the leftmost position that does the work.
What the flexibility actually buys
It buys the ability to handle tasks you could not map in advance.
“Find out why this customer’s invoice is wrong” might need a lookup, then a second lookup depending on the first, then a check against a policy, then a different path entirely if the account is old. You cannot draw that chain beforehand because the shape depends on what turns up.
That is a real use. It is narrower than the marketing suggests.
What it costs
You cannot read the path before it runs. A workflow can be reviewed, tested case by case, and reasoned about. An agent’s route is discovered, so the same input may produce different routes on different days.
Failures are harder to place. In a chain you know which step broke. In an agent the fault may be a choice twelve turns earlier that looked reasonable at the time.
Cost and time are not bounded by design. A chain runs its steps and stops. A loop runs until the model decides it has finished, which is a different guarantee. L2 and L6 are about that.
The capability list becomes the whole risk. What an agent can do is the set of tools you gave it, and it will choose among them using text it has read. P3 applies directly, and L3 returns to it.
Most should be workflows
This is the claim worth taking away, and it is a practical one rather than a fashionable one.
When people describe a task as needing an agent, a closer look often reveals a fixed path with one step that really does need a choice. A refund request: validate the order, look up the policy, decide whether it qualifies, issue it or decline. Four fixed steps and one judgement.
Build that as a workflow with a model in the third step. You keep the exactness of the other three, and you have confined the unpredictability to the one place it belongs.
Promote a step to a loop only when you can state why a fixed branch cannot do it. If you cannot state it, it is a workflow.
Lrnon’s own answer
Sky is deliberately not an agent.
For each question it does the same things in the same order: score the lesson passages by rule, take the best few, make one call to the model, check that the answer cites a passage, and record the cost. There is no loop. The model is never asked what to do next, and has no tools to choose from.
That was a choice, and the reasoning is stated in L8. For now the point is the shape: a route you can read from top to bottom, with a single place where the model is trusted to use judgement.
Try it now (10 minutes)
Take something you described to yourself as “an agent”, or that you have seen sold as one. Write the path as you would draw it.
Then ask: at which points does the next step genuinely depend on something I cannot know in advance? Count them.
If the answer is zero, it is a workflow with a mistaken name. If it is one or two, those positions are the only places a model should be choosing.
Check your understanding
Recap
The line between a workflow and an agent is who decides the next step. It is a spectrum, and each move towards the agent end trades predictability for flexibility on tasks you could not map in advance. The costs are a path you cannot read beforehand, failures that are harder to place, no built-in bound on cost or time, and a capability list that becomes the whole risk. Most things described as agents are workflows with one real judgement in them, and the sensible build keeps the fixed steps fixed.
🗂 3 flashcards from this lesson join your daily review.