Skip to content
Course contents · How AI agents actually work

Lesson 12 of 13

Not everything needs to be an agent.

The difference between a workflow and an agent, why autonomy is a dial rather than a switch, and where to start.

A train runs on rails. The route was decided long before you boarded, and it goes the same way every time. A taxi driver picks the route as they go, around roadworks and closures. Both get you there. You wouldn't want the train improvising, and you wouldn't want the taxi stuck on rails.

Two different things

Now that "agent" is the word of the year, everything gets called one. But there's a useful distinction hiding underneath, and it changes how you build.

Workflow
A fixed path: step 1, step 2, step 3. The model might do the steps (summarise this, draft that), but a person decided the route in advance. Same order, every time.
Agent
Picks its own route. It looks at the goal, chooses the next step, sees the result and chooses again. That's the loop from the agents lesson.

Neither is better. They're different tools for different jobs.

When to use which

Use a workflow when the path is known. You don't want creativity here. You want the same thing done the same way, every time, cheaply.

A workflow: the route is decided in advance4 steps
  1. An invoice arrives
  2. Extract the details
  3. Check them against the purchase order
  4. Flag any mismatches

Use an agent when the path is unknown. "Find out why this customer left us" can't be written as steps in advance, because each step depends on what the agent finds: their emails, their support tickets, their usage, a price change last spring.

Workflows
Cheaper, faster, predictable, easier to debug.
Agents
Handle the jobs you couldn't script.

A dial, not two boxes

In practice it isn't a choice between two boxes. It's a dial with notches in between:

From most predictable to most autonomous4 steps
  1. Fixed workflow
  2. Workflow with one decision point in the middle
  3. Agent on a short leash: few tools, human checkpoints
  4. Agent on a long leash: many tools, a wide goal

Every notch of autonomy buys you flexibility and costs you predictability. That's why the rest of this course exists. Evals measure what the autonomy is doing. Permissions bound it. Context and memory feed it. You need more of all of them with every notch you turn.

Start at the workflow end

The engineering advice right now is unglamorous: start at the workflow end, and only add autonomy where the fixed path actually fails.

Build the predictable version first. Run it on real work. When you find a step that keeps breaking because the right action depends on what turns up, add a decision point there, or hand just that step to an agent. Turn the dial one notch at a time, and only where it earns its keep.

Anthropic's guide to building agents makes the same point: look for the simplest thing that works, and only add complexity when it clearly improves the result.

Running example

The running job

Chasing last month's unpaid invoices, one lesson at a time.

So where does chasing Priya's overdue invoices sit on the dial? Mostly at the workflow end. It runs on a schedule, on the first working day of the month, and the steps are known in advance:

Step by step5 steps
  1. Find the invoices that are unpaid and past their due date
  2. Decision point: has this client paid since, or are they disputing it?
  3. If not, draft a polite reminder in Priya's tone
  4. Human checkpoint: Priya approves each email
  5. Send it, and add a row to the chasing spreadsheet

One decision point, which needs a little judgement about each client's emails, and one human checkpoint before anything leaves the building. That's notch two with a checkpoint, not a free-roaming agent. It's cheaper, easier to check, and it does the same thing every month.

Practice

Try it yourself

About five minutes, in any AI chat app

Put a job on the dial

  1. Pick a task you repeat at work, such as weekly reporting, answering a common enquiry or onboarding a new client.

  2. Write down its steps in order. Mark any step where what happens next depends on what you find.

  3. Ask any AI chat app: "Here are the steps of a task I do. Which parts could be a fixed workflow, and which genuinely need judgement each time? Where would you put a human check?" Paste your steps.

What to look for

Most of the steps will probably be fixed, with one or two judgement points. That's normal. If the AI suggests making the whole thing an agent, ask it why the fixed steps can't stay fixed.

Common mistakes

  • Calling everything an agent and building it that way.

    If you can write the steps down in advance, build a workflow. It will be cheaper and more predictable.

  • Giving an agent a long leash on day one.

    Start at the workflow end. Add autonomy only where the fixed path actually fails.

  • Turning up autonomy without adding checks.

    Each notch needs more evals, tighter permissions and better context to match.

Quick check

3 questions to see what stuck. Nothing is scored or saved.

  1. 1. What's the key difference between a workflow and an agent?

  2. 2. Which job is the better fit for an agent?

  3. 3. Where's the sensible place to start?

Remember

Autonomy is a dial. Start with a workflow, and turn it up only where the fixed path fails.

Sources and further reading

  1. 1.The LinkedIn post this lesson grew out of: Not everything needs to be an agent
  2. 2.Anthropic: Building effective agents

Optional

Try it in LaunchLemonade

Workflows can run on a schedule or when an email arrives. When one runs by itself, it asks you first before it sends, replies, changes or deletes anything. Everything above works in any AI tool.

Build a workflow

Finished this lesson?

0 of 13 done in this course. Progress stays in this browser, no account needed.