All writing

AI & Technology

Agents vs. workflows: what actually counts as an agent

The Anthropic distinction that stops teams calling every prompt chain an 'agent'.

Jun 20, 20261 min readagents · llm · fundamentals
Agents vs. workflows: what actually counts as an agent cover

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;
}

Most production "agents" are really workflows with one clever routing step.

- Anthropic, Building Effective Agents

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.

Filed under:agentsllmfundamentals
All posts