Phase 3 — Core AI Engineering · Lesson 34 · 20 XP
Workflows vs agents, planning
A workflow is a fixed sequence of steps you write explicitly in code. An agent lets the model decide the steps dynamically, at runtime. A workflow is more predictable, cheaper (fewer model calls), and far easier to test and debug — reach for it whenever the steps a task needs are actually knowable ahead of time.
An agent earns its extra complexity and cost only when the steps genuinely can't be known in advance — the task varies too much between runs to hardcode. A middle ground is planning: have the model produce an explicit plan first, then execute it step by step, which is more controllable and inspectable than letting the model improvise the entire way through.
Exercise
Take a task you'd naturally reach for an agent to solve, and redesign it as a fixed workflow instead. Write a short argument for which one is actually the better fit for that specific task, and why.
Check yourself
1. Give one concrete task that's better solved by a fixed workflow than an agent.
2. What's one real cost of using an agent for a task where a plain workflow would have worked just as well?
Agents: the tool-use loop
Answer the check-yourself questions to unlock this