01. What It Is
An AI agent is a system built around a language model that can perceive its environment, plan actions, invoke tools, observe results, and iterate until a task is complete. Agents are not static: they decide what to do next based on what they observe, not by following a fixed script.
Anthropic draws a sharp distinction between agents and workflows:
Workflows are systems where LLMs and tools are orchestrated through predefined code paths. The sequence of steps is determined in advance. A workflow might call an LLM to classify an input, route it to one of three handlers, then call a second LLM to format the output. Each step is explicit and the branching logic lives in your code, not in the model.
Agents are systems where the LLM dynamically directs its own processes and tool usage, deciding at runtime how to accomplish a task. The model chooses which tools to call, in what order, and when to stop. This produces greater flexibility but also greater unpredictability.
In practice, most production systems sit on a spectrum. A system might follow a predefined workflow for known cases but fall back to an agent loop when the task is novel or ambiguous.