Workflows vs. Agents: The Core Architectural Decision
CoreDecide between a workflow and an agent architecture · Difficulty 1/5
Explanation
The Core Distinction
| **Workflow** | **Agent** | |
|---|---|---|
| Control flow | Predefined code paths orchestrate LLM calls | LLM decides its own steps and tool calls dynamically |
| Predictability | High -- deterministic, easy to test | Lower -- path varies per run |
| Best for | Well-defined tasks with known steps | Open-ended tasks where steps can't be predicted |
| Cost/latency | Lower, bounded | Higher, variable |
Anthropic's guidance is explicit: find the simplest solution possible, and only increase complexity when needed. Agentic systems often trade latency and cost for better task performance on open-ended work, so that tradeoff has to earn its place -- it is not a default upgrade.
The Augmented LLM
The foundational building block underneath both workflows and agents is the augmented LLM: a model enhanced with retrieval, tools, and memory. Most workflows are simply fixed compositions of this block; an agent is what you get when the augmented LLM is given control over its own looping and tool-selection decisions instead of being driven by predefined code.
The Agent Loop
An agent proper runs an open-ended loop: it plans, calls tools, observes results (ground truth from the environment), and repeats until it decides the task is done or a stopping condition is hit. This looping, environment-grounded structure is what distinguishes an agent from even the most elaborate fixed workflow.
Common exam traps
- "Agents are always better than workflows." No -- Anthropic recommends the simplest thing that works; an agent adds latency, cost, and unpredictability. Use a workflow for well-defined tasks with known steps.
- Assuming autonomy should be added whenever a framework or capability is available, rather than only when the task genuinely benefits from it.
Key Takeaways
- A workflow orchestrates LLM calls through predefined code paths; an agent lets the LLM direct its own steps and tool use dynamically
- Both are built on the augmented LLM (model plus retrieval, tools, and memory)
- An agent loop plans, acts, observes real environment feedback, and repeats until done or stopped
- Find the simplest solution first -- agentic autonomy must earn its added cost, latency, and unpredictability
- "Agents beat workflows" is a common exam trap; the correct frame is task-fit, not a capability hierarchy
Glossary Terms
Related Concepts