Say a team spends six weeks building an agent. It reads a refund request, checks the order, applies the refund policy, issues the refund, and emails the customer. Those are the same five steps every time, in the same order, governed by rules the finance team wrote down years ago.

They give it a planner and a tool loop anyway. Now the same request sometimes takes three tool calls and sometimes eleven, and a failure means reading a trace instead of a stack trace. The autonomy they paid to build behaves like a bug.

Four patterns answer four different questions

Chatbot fits when the user wants a conversation and success is a useful reply. State is the transcript. The risk is that it answers confidently from nothing.

Workflow fits when you already know the steps. The model does the parts software is bad at (classification, extraction, drafting) at fixed points you control. Control flow stays in your code, which means it stays testable.

Agent fits when the path genuinely cannot be known in advance. The model chooses the tools and the order. You buy flexibility and you pay in determinism, cost variance and debugging time.

RAG fits when answers must be grounded in a corpus that changes faster than any release cycle. It is a grounding strategy, and that is why it composes with the other three.

The common error is treating agent as the advanced tier of the other three. It is a trade, and teams that pick a framework before writing down the steps make it without noticing one was on offer.

The question that decides it

Can you draw the steps on a whiteboard?

If you can, do not pay a model to rediscover them at runtime on every request. Encode them, and give the workflow an explicit exit, usually a human queue, for the input that fits no branch; without one, that input gets forced down the nearest wrong path. Autonomy is worth its cost only where the inputs are messy and the branching is too real to enumerate in advance.

The second question is about blast radius. A pattern that can only produce text is a different risk class from one that can move money or delete records. Autonomy and irreversibility are a bad combination, and the fix is usually a narrower pattern rather than a stronger prompt.

Combining without overbuilding

Real systems mix. A workflow with a RAG step is the most common production shape and the most underrated: deterministic control flow, grounded content at one node. A chatbot that hands off to a workflow the moment intent is clear beats a chatbot that tries to do everything conversationally.

The discipline is to add each pattern for a stated reason. Looking more serious with all four on the diagram does not count. Every pattern you add brings its own failure mode, its own eval set, and its own on-call story.

Choose the smallest pattern that solves the user's actual problem, then let evidence push you up.

If the AI feature you shipped most recently is an agent, pull a week of its traces and list the distinct sequences of tool calls. If nearly every request follows the same one, you are paying agent prices for a workflow: encode that sequence and keep the model only at the steps that need it. If the sequences genuinely vary with the input, the autonomy is earning its cost.

About this comparison

Format
Comparison
Level
Practitioner
Read
2 min read
Published
Sep 8, 2026
Disciplines

Capabilities and trade-offs, without a winner score.