Junior interview question
What's the difference between a workflow and an agent?
Model answer
Who chooses the next step. In a workflow, predefined code paths orchestrate the model and tools. In an agent, the model directs its own process and tool use.
Scroll sideways to see the whole diagram
Anthropic: workflows are systems where models and tools are orchestrated through predefined code paths. The model does steps; code decides their order.
Text version
- Anthropic: workflows are systems where models and tools are orchestrated through predefined code paths. The model does steps; code decides their order.
- Workflows offer predictability and consistency for well-defined tasks.
- Agents are systems where the model dynamically directs its own process and tool use.
- That suits open-ended problems where the number of steps can't be predicted, at the price of higher cost and the potential for compounding errors.
Workflows suit well-defined tasks; agents, open-ended ones where the number of steps can't be predicted.
Practise the rest
6 Workflows vs agents questions, 492 in all, each with a model answer. Free.