What is an agentic workflow, and how is it different from an AI agent?
A fixed sequence of model calls and tools that your code controls, such as classify, then look up, then draft. An agent decides its own next steps; a workflow follows the path you wrote.
intermediate · Also called AI Workflow, LLM Workflow, Prompt Chaining, Routing, Evaluator-Optimizer
"Agentic" gets used for any system where a language model does more than answer once. It helps to split that into 2 kinds, as Anthropic's engineers do. In a workflow, your code decides the steps: the model is called at fixed points, for fixed jobs, and the path is the same every time. In an AgentAgentA model that uses tools in a loop, deciding each next step from what the last one returned, until the task is done., the model decides the steps: it chooses which tool to call next, reads the result and keeps going until it judges the task done.
A shop's email handling as a workflow looks like this:
- A model sorts the email into a category.
- Code looks up the order, if there is a number.
- A model drafts a reply from the email and the order.
- A person sends it.
Each step can be tested on its own, the cost of an email barely varies, and nothing happens that you did not write.
The common workflow shapes
Anthropic names 5 patterns that cover most workflows:
- Prompt chaining. One call's output is the next call's input, with checks in code between them: write an outline, check it, then write the text.
- Routing. A first call classifies the input and sends it to the prompt, tool or model that suits it: refunds one way, product questions another, easy questions to a small model.
- Parallelization. Split a task into parts that run at once (sectioning), or run the same task several times and compare the answers (voting).
- Orchestrator-workers. A model breaks a task into parts it could not know in advance and hands them out, the planner-executorPlanner-Executor PatternAn agent design that splits the work in 2. A planner writes the whole plan first, and an executor, which can be cheaper code or smaller models, carries out each step. The plan is changed only when a step fails. shape.
- Evaluator-optimizer. One call writes, a second judges against criteria, and the first revises until the judge passes it.
Workflow or agent?
Start with the simplest thing that works, and add steps only when testing shows they help. A workflow fits when you can write the steps down: it is predictable, cheaper and easier to test. An agent fits when you cannot, because the number of steps depends on what each one finds, as in debugging code or researching a question. That freedom costs more tokens and lets mistakes compound, so agents need limits on their steps, tools that cannot do serious harm on their own, and an eval setEval SetThe list of test cases an LLM app is graded on after every change. Each case is an input and what a good answer must do, so a score going up or down shows whether the change helped. that checks what they actually did.
Most real systems mix the two: a workflow whose steps include a small agent, or an agent that calls a fixed workflow as one of its tools.
Sources