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 codeYour codestep 1 of 2Policy searchPolicy searchLanguage modelLanguage model
  • Your code — healthy — step 1 of 2
  • Policy search — healthy
  • Language model — healthy
  1. The steps are known. For a refund question, your code runs the same two steps in the same order every time.
  2. One call, one job. Step two sends what the search found to the model, which only has to write the answer.
  3. The model decides. In an agent, the model reads each result and chooses the next step, so paths differ run to run.
  4. Side by side. A workflow has a known number of calls and a cost known ahead; an agent has only a cap.
  5. Start with a workflow. Move to an agent only when what each step finds decides the next one.
  6. 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

  1. A workflow runs known steps in a set order, written in code.
  2. Each model call in a workflow has one small, testable job.
  3. An agent lets the model pick each next step at run time.
  4. Reach for an agent only when the steps cannot be known ahead.

Many AI features need no . 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 .

Example. A refund question is always "search the policy, then answer": two steps and one model call. Planning a trip across three booking sites is not, since each answer changes what to check next.

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.

Check yourself

Every refund question needs the same two steps: search the policy, then answer. What fits best?