In an agent loop, the model’s output picks the next step: it outputs a tool call, and that call is what runs. A workflow graph turns this around. The steps and the arrows between them are written down in ordinary software ahead of time, and the code follows the arrows.
A simple example: fetch the document, then ask a model to summarise it, then check the summary against a rule, then either send it on or go back one step. The model is used inside some of the boxes, but it does not choose which box comes next. The graph does.
Anthropic’s guide to building agents draws the same line. It calls systems where models and tools are orchestrated through predefined code paths “workflows”, and keeps “agents” for systems where the model directs its own process and tool use.
Neither is better in general. A graph is easier to test, cheaper to run and harder to lead astray, because a step that is not on the map cannot happen. An open agent loop copes better with tasks whose steps cannot be known in advance. Many real systems mix the two: a graph with a small agent loop inside one of its boxes, or an agent whose tools are themselves small workflows.
“Graph engineering” is an informal name some people now use for designing these maps.
The explainer runs the same task both ways so you can compare the steps and the cost.