📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

What is the difference between an AI agent and a workflow that calls an LLM at fixed steps, and how do you decide which one a feature needs?

Mid-Level Theory Intermediate agent-framework ai ai-agents architecture guardrails workflows

🎯 Key points

  • Workflow: code decides the steps and holds state; agent: the model decides
  • Workflow steps have known inputs and outputs, so they unit-test, retry and cost predictably
  • Example: email triage = workflow; multi-system order investigation = agent
  • Agents cost more calls and have variable latency and harder evaluation
  • Agents need iteration / token caps, least-privilege tools and tracing
  • Human approval for agent actions with real-world effect
  • Start with a workflow; move to an agent only when steps can't be fixed

⏱ 30-second answer

A workflow runs steps you wrote in code and calls the model at known points: classify an email, extract fields, draft a reply. Control flow and state live in your code (or a durable orchestrator), so each step has a known input and output that you can unit-test, retry and cost up front. An agent gets a goal and tools and chooses the steps itself in a loop until it decides it is done. An example is a support assistant that investigates an order across several systems in whatever order the case needs.

Workflows are cheaper, faster and predictable. Agents handle open-ended tasks with unknown paths, at the cost of more calls, variable latency and harder evaluation. Choose a workflow when you can write the steps down, and an agent only when you can't. Then add an iteration and token cap, least-privilege tools, human approval for actions with real-world effect, and tracing of every step.

🔍 What the interviewer is checking

Checks judgement about autonomy, cost and predictability.

Green flags

  • Defines the difference by who controls the steps
  • Gives a concrete example of each
  • Defaults to a workflow and adds limits and approval to any agent

Red flags

  • Calls every LLM integration an agent
  • Gives an agent write tools with no cap, approval or tracing

↩ Usually asked after

More in .NET and AI

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me