Course contents · How AI agents actually work
- 1What is an LLM?
- 2Prompts: brief it like a contractor
- 3Tools: how an AI does things
- 4Context: what's on the desk
- 5Memory: the filing cabinet
- 6What is an AI agent?
- 7Evals: how do you know it works?
- 8Who approves what an agent does?
- 9RAG: finding the right page
- 10Subagents: when an agent delegates
- 11MCP: one plug for every tool
- 12Not everything needs to be an agent
- 13The whole picture
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.
CTO and co-founder, LaunchLemonade7 minReading timeA 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.
- An invoice arrives
- Extract the details
- Check them against the purchase order
- 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:
- Fixed workflow
- Workflow with one decision point in the middle
- Agent on a short leash: few tools, human checkpoints
- 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:
- Find the invoices that are unpaid and past their due date
- Decision point: has this client paid since, or are they disputing it?
- If not, draft a polite reminder in Priya's tone
- Human checkpoint: Priya approves each email
- 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
Pick a task you repeat at work, such as weekly reporting, answering a common enquiry or onboarding a new client.
Write down its steps in order. Mark any step where what happens next depends on what you find.
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. What's the key difference between a workflow and an agent?
2. Which job is the better fit for an agent?
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.The LinkedIn post this lesson grew out of: Not everything needs to be an agent
- 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.
Finished this lesson?
0 of 13 done in this course. Progress stays in this browser, no account needed.