Agents interview question · Most asked
What is the difference between a workflow and an agent?
Summary
In a workflow, your code defines the sequence of LLM calls and tools (prompt chaining, routing, parallelisation); in an agent, the model decides the next step dynamically in a loop. Workflows are more predictable and cheaper; agents handle open-ended tasks where the steps can't be known in advance.
Longer Answer
Many production systems are workflows with one agentic step. Prefer the simplest design that works, and add autonomy only where it measurably helps.
Key Points
- Workflow: code decides the steps.
- Agent: model decides the steps.
- Workflows are predictable and cheaper.
- Use the simplest design that works.
More most-asked Agents questions
- Agents leaf: What is the ReAct pattern?
- How do you keep humans in control of an agent's risky actions?
- How do you evaluate an agent?
- Agents leaf: How do you prevent infinite tool loops?
- Agents leaf: What is structured function calling?
- How do you stop an agent from looping forever or running up a huge bill?
- Agents leaf: When should you avoid agents?
- Agents leaf: What is tool hallucination?