LearnThatStack Ace your next interview
AI Agents · question
Question 5 of 54

What is the difference between a deterministic workflow and an agentic workflow?

beginner
← All AI Agents questions
Re-explain

A deterministic workflow has its steps fixed in code, so every run follows the same path. An agentic workflow lets the model pick the next step at runtime, so the path changes with the input.

Deterministic workflow Agentic workflow
Picks the next step Your code The model
Path across runs Same Varies
Testing Assert on the output Judge the whole trajectory
Cost and latency Predictable Open-ended
Best for Known, stable steps Branching, open-ended tasks

The trade-off is control versus flexibility. Fixed steps buy repeatable runs, cheap debugging, and a predictable bill. Agency handles cases you never listed.

Most production systems mix both: a fixed pipeline with one agentic step where the branching is unknown. Start deterministic, and add agency only where fixed logic keeps failing.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

The diagram below the answer is the concept . Jump to it ↓

Tailored explanation · switch back to · ·
What should the new diagram focus on?
Guided practice for AI Agents One question at a time. Answer out loud, get graded, see what you missed.
How well did you know this?
AI:

Saved in this browser - sign in to keep your review list.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Interview lens How interviewers actually use this question

Likely follow-ups

What you can say

  1. In a deterministic workflow my code fixes the steps, so every run follows the same path.
  2. In an agentic workflow the model chooses the next step at runtime, so the path changes with the input.
  3. With fixed steps I can assert on the output, but with an agent I have to judge the whole trajectory, and cost and latency become open-ended.
  4. Fixed steps give you repeatable runs, cheap debugging and a predictable bill, while agency covers the cases you never listed, so the trade-off is control versus flexibility.
  5. Most production systems mix the two, with a fixed pipeline and one agentic step where the branching isn't known up front.
  6. My default is to start deterministic and add agency only where the fixed logic keeps failing.

Weak answers to avoid

  • Treats agentic as strictly better Agency costs you repeatable runs, easy debugging and a predictable bill. Say you start deterministic and add agency only where fixed logic keeps failing.
  • Calls any pipeline with an LLM call agentic Calling a model inside a step doesn't make a workflow agentic. What matters is who picks the next step, your code or the model.
  • Frames it as either-or Most production systems mix both. Describe a fixed pipeline with one agentic step where the branching can't be known in advance.
  • Skips testing and cost The difference shows up in operations. Contrast asserting on outputs with judging trajectories, and predictable cost and latency with open-ended ones.
Interview lens

Likely follow-ups, what you can say, and the weak answers to avoid.

Sign in free to open it Free account - the lens opens as soon as you're back.

Want a quick review of the fundamentals? See the AI Agents cheatsheet.

← Back to all AI Agents questions
Pro · $10/mo

47 of 54 AI Agents answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime