"Build an agent" is rarely the right first move. Most reliable LLM systems are workflows — fixed, predictable arrangements of model calls you wire up in code. Only some tasks need a true agent that decides its own steps. Flip through the five building blocks (from Anthropic's Building Effective Agents) and learn the one question that decides which to use.
In a workflow, you wire the control flow in code — the path is fixed and predictable. In an agent, the model directs its own process, choosing tools and steps in a loop until it decides it's done. Agents are more flexible but less predictable and more expensive. So the rule is: use the simplest thing that works — one prompt first, then a fixed workflow, and only an autonomous agent when the task genuinely needs open-ended decisions you can't script. Step through the spectrum:
These aren't mutually exclusive. A router can dispatch to a chain; an orchestrator's workers can each run an evaluator–optimizer loop; an autonomous agent can call a whole workflow as one of its tools. The discipline is to add autonomy only where it earns its keep, keep a human in the loop for consequential actions, and always cap the loop so an agent can't run away. The fully autonomous end of this spectrum is the agent loop you can drive in its own explainer.
Curated companion: Anthropic — Building Effective Agents.