AI & Technology
Agents vs. workflows: what actually counts as an agent
The Anthropic distinction that stops teams calling every prompt chain an 'agent'.

The short version
Anthropic's "Building Effective Agents" frames it cleanly: workflows are systems where LLMs and tools are orchestrated through predefined code paths — predictable and controllable. Agents are systems where the LLM dynamically directs its own process and tool use, operating in a loop toward a goal — flexible but less predictable.
The building block
The base unit is an LLM augmented with retrieval, tools, and memory. Workflows compose that unit along paths you define; agents hand the steering wheel to the model.
type Step = {
name: string;
run: (input: State) => Promise<State>;
};
async function workflow(steps: Step[], state: State) {
let current = state;
for (const step of steps) {
current = await step.run(current);
}
return current;
}- Anthropic, Building Effective AgentsMost production "agents" are really workflows with one clever routing step.
When to reach for which
Prefer a workflow first — it is easier to test, cheaper to run, and easier to reason about. Reach for a true agent only when the task is open-ended and the number of steps can't be known in advance.
Source: Anthropic, Building Effective Agents.