Module 5 · Lesson 1 of 6 · Emerging
Fixed workflows come first
Your code picks the steps
In a fixed workflow your code runs the steps in a set order; in an agent the model picks each next step.
Scene 1 of 5 · The steps are known
For a refund question, your code runs the same two steps in the same order every time.
- Your code — healthy — step 1 of 2
- Policy search — healthy
- Language model — healthy
- The steps are known. For a refund question, your code runs the same two steps in the same order every time.
- One call, one job. Step two sends what the search found to the model, which only has to write the answer.
- The model decides. In an agent, the model reads each result and chooses the next step, so paths differ run to run.
- Side by side. A workflow has a known number of calls and a cost known ahead; an agent has only a cap.
- Start with a workflow. Move to an agent only when what each step finds decides the next one.
- Now you try. Pick a task, and see which shape fits it. For example: A fixed workflow. The steps never change: search the policy, then answer from it.
Scene 1 of 5: The steps are known. For a refund question, your code runs the same two steps in the same order every time.
Key points
- A workflow runs known steps in a set order, written in code.
- Each model call in a workflow has one small, testable job.
- An agent lets the model pick each next step at run time.
- Reach for an agent only when the steps cannot be known ahead.
Many AI features need no (A model that calls tools in a loop, deciding each next step from the results, until it can answer.). In a fixed workflow, your code runs known steps in a set order. The model does one job inside a step, such as writing an answer or picking a label.
A workflow is cheaper and easier to trust. The number of model calls is known, each step can be tested on its own, and a failure points at one step.
An agent lets the model choose each next step. That is worth its cost only when the steps depend on what each one finds, such as searching several sites for a free table.
Many systems mix the two: a fixed workflow with one step that hands a narrow task to an agent, under a (The most turns an agent's loop may take before it must stop and report what it could not finish.).
In system design: Write the steps in code when you know them. Use an agent only for the part you cannot list in advance, with limits around it.