Part 1 of 5 · 1 min read
Overview
In this module you will
- State the difference between a workflow and an agent in one sentence each.
- Apply a short checklist and justify the choice in writing.
- Explain the cost, variance and error-compounding differences with numbers.
- Design a hybrid: a workflow with an agent only at the stage that needs one.
The most common mistake is reaching for an agent when a workflow would be cheaper, faster and easier to test. The second most common is forcing a workflow onto a task whose steps truly cannot be listed. Interviewers ask this question because the answer shows engineering judgement more than any API knowledge.
Workflow versus agent
A workflow: your code fixes the sequence of steps, and the model does the thinking inside each step. The same input follows the same path. An agent: the model chooses the next action, usually in a loop with tools, and decides when to stop.
A third idea sits between them and is usually the best answer: build the overall process as a workflow, and make only the one stage that needs flexibility an agent. For example, a document pipeline can validate and extract metadata (workflow), research the content with an agent that may use several tools, then run compliance checks and delivery (workflow again). The agent works freely inside its stage, but the process around it stays predictable, and if the agent fails, the workflow can retry, fall back or hand over to a person.