The problem it solves
Many real tasks have a known shape. To handle a support email you might: classify it, look up the customer, draft a reply, and check the reply against policy. Those steps do not change from one email to the next, and the order is always the same.
When the steps are known in advance, you do not want the model improvising a new plan every time. You want reliability: the same process, every run, that you can test, measure, and trust. A workflow gives you exactly that. The developer lays out the path, and the model fills in the parts that need language or judgment, while the overall flow stays fixed and predictable.
How it works
The clearest definition comes from Anthropic: a workflow is a system where models and tools are orchestrated through predefined code paths. The control, the decision about what happens next, lives in the code the developer wrote, not in the model.
The developer owns the flow. The sequence of steps is written out: do this, then this, then this. The model is called at specific points to do specific jobs, classify this text, summarize that document, but it does not decide what step comes next. The code does.
Each step is small and checkable. Because the stages are fixed, each one can be tested and evaluated on its own. If the classification step is weak, you can find and fix it in isolation, without untangling the whole system. This is what makes workflows reliable and easy to debug.
Predictability is the point. A workflow does the same thing every time. That is a feature when the task is well understood, and it is exactly what regulated or high-stakes processes need.
The trade-off is flexibility. A workflow handles the cases its path was designed for, and struggles the moment a task falls outside that path. When the steps genuinely cannot be known in advance, that is the signal you may need an agent instead.
A concrete example
Think of processing an incoming invoice.
A workflow handles it as a fixed pipeline: extract the amount and vendor, match it against the purchase order, flag any mismatch for a human, and file it. Every invoice follows the same four steps in the same order. The model does the reading and matching, but the process is set. It is reliable, auditable, and easy to improve one step at a time, because invoice processing has a known shape that does not need reinventing each time.
How it connects
A workflow is the counterpart to an agent: a workflow follows a path fixed by the developer, while an agent decides its own path as it goes. Both are built out of the same raw capability, a model using tool use to do things, but they differ in who controls the flow. The practical wisdom, again from Anthropic, is to prefer the simpler option: if a task can be handled by a workflow, use one, and reach for an agent only when the task truly demands it.
Choosing between them is core to the technical roles. An AI Solutions Architect makes exactly this call; an AI/LLM Developer builds whichever fits; an AI Consultant helps decide when a predictable workflow is safer than an autonomous one.
