Mid

Workflows vs agents: how do you decide?

How to answer it in an AI engineer interview: what is being tested, a step-by-step framework, a sample answer and the mistakes to avoid.

$19.99 on Gumroad, instant download40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.

Practiced one out loud? Paste your answer into the free self-check and get a score in 30 seconds

What the interviewer is testing

Whether you can choose the simplest architecture that solves the task, and explain the predictability, cost and testing differences.

Answer framework

  1. Workflow: code defines the steps (classify, retrieve, draft, check); the LLM fills specific steps.
  2. Agent: the model decides which steps to take and in what order, using tools in a loop.
  3. Choose a workflow when the path is known: it is cheaper, faster, easier to test and to audit.
  4. Choose an agent when the path depends on what is discovered, such as open-ended research or debugging.
  5. Hybrid: a workflow with one bounded agentic step is often the best fit.

Sample answer

The difference is who controls the path. In a workflow my code decides the sequence: for example, classify the ticket, retrieve the policy, draft a reply, check it against rules, send it for review. The model does specific jobs inside fixed steps. In an agent, the model decides what to do next, which tool to call and when it is finished.

I default to workflows when I can write the steps down, because they are predictable. Each step can be tested on its own, costs and latency are bounded, and it is easy to explain to compliance what happened. Agents make sense when the next step genuinely depends on what was found, such as investigating a production incident, where you cannot know in advance which logs or services matter.

Most real systems end up hybrid: a workflow that handles routing, permissions and final checks, with one bounded agentic step inside it, such as research with a step limit. I would start with the workflow version, measure where it fails, and add autonomy only where that failure is about needing flexible steps.

Likely follow-ups

Give an example where an agent clearly beats a workflow. Debugging a failing build across an unfamiliar codebase, where each finding determines the next file or command.

Common mistakes

The PlaybookWant the full method?

The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, system-design walkthroughs and an 8-week plan.

Get the playbook 40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.

Interviewing for PM or TPM? See the full PM package, $59 on Gumroad: a resume system, a PM, TPM and PGM interview handbook, a 1:1 cheat sheet and a PM playbook. PM and TPM content, not AI engineer prep.

Related questions

Based on question #52 in the full question bank.