Start studying
Module 11 · AI Agents Module contents
Module 11  ·  Card 14 / 17beginner

Workflows

A workflow is a fixed sequence of steps you define in code.

An agent decides its own path, while a workflow follows yours.

Workflows are predictable, cheaper, easier to test and easier to debug.

Agents are better when the path genuinely cannot be known in advance.

Most production systems should be workflows with an agent only where needed.

Learn in depth ↓
Module 11 · AI Agents · 17 concepts
In depth  /  15 lines

Workflows, in more detail

A workflow is a fixed sequence of steps you write in code.

An agent decides its own path, and a workflow follows the one you chose.

The difference is who holds control, and that is the whole distinction.

Workflows are predictable, testable, cheaper and far easier to debug.

You can unit test each step and know what will happen tomorrow.

A model call can still sit inside a step, doing the part that needs language.

Classify this ticket, then route it, then draft a reply is a workflow with three model calls.

None of those steps needs the model to decide the order.

Agents earn their cost when the path genuinely cannot be known in advance.

Open-ended research and debugging are honest examples.

Most production systems should be workflows with an agent in the one place that needs it.

The industry drifted towards agents for everything and is drifting back.

An agent that always takes the same three steps should have been a workflow.

Start with the workflow and let a real failure justify the agent.

You can also let an agent produce a plan and then execute it as a workflow.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
When should you prefer a workflow over an agent?
AI Agents

17 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close