Agents, Tool Use & MCP·Question 1 of 90BasicAI-75

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

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

A workflow orchestrates LLM calls and tools through predefined code paths; an agent lets the LLM dynamically direct its own process - deciding which tools to call, in what order, and when the task is done. This is Anthropic's framing from Building Effective Agents and it's the vocabulary most interviewers expect.

Full worked answer with diagram

A workflow orchestrates LLM calls and tools through predefined code paths; an agent lets the LLM dynamically direct its own process - deciding which tools to call, in what order, and when the task is done. This is Anthropic's framing from Building Effective Agents and it's the vocabulary most interviewers expect.

The distinction is really a spectrum of agency: a single augmented LLM call → prompt chaining (fixed sequence of calls) → routing (LLM picks a branch, code executes it) → parallelization → orchestrator-workers → a full open-ended loop where the model owns control flow. Each notch toward agency buys flexibility on tasks you couldn't enumerate, and costs you predictability, latency, money, and evaluability.

Concrete contrast: "classify this support ticket, then run the matching template" is a workflow - the LLM makes one bounded decision inside code you wrote. "Investigate why this customer's export is failing and fix it" is agentic - you can't know in advance whether it takes 3 steps or 30, or which tools it needs.

The senior-engineer point interviewers listen for: agency is a cost you pay, not a feature you add. A workflow with an LLM inside is easier to test (deterministic paths), easier to debug (you know where you are), and cheaper. You escalate to an agent only when the branching factor of the task defeats enumeration. Most production "agents" in 2026 are actually workflows with one or two genuinely agentic sections, and that's good engineering, not a compromise.

Worth sketching. The ladder makes the point that agency is a dial, not a binary, and it shows exactly where control flow leaves your code.

flowchart LR
    A["Single call"] -->|"code owns every path"| B["Prompt chain"]
    B --> C["Routing<br/>one model decision"]
    C --> D["Orchestrator + workers"]
    D -->|"model owns control flow"| E["Open agent loop"]

What a good answer covers

  • A workflow orchestrates LLM calls and tools through predefined code paths; an agent lets the LLM…
  • The distinction is really a spectrum of agency
  • Each notch toward agency buys flexibility on tasks you couldn't enumerate, and costs you predictability,…
  • Concrete contrast: "classify this support ticket, then run the matching template" is a workflow - the…
  • "Investigate why this customer's export is failing and fix it" is agentic - you can't know in advance…

Interviewer follow-ups to expect

  1. Where on that spectrum would you place a RAG chatbot that can optionally issue a search query?

  2. Can a system be a workflow at the top level with agents inside it?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep