What Is An AI Agent? Workflows, Agents And When You Need One
An AI agent is a system where a language model chooses its own next steps and tools. Here is how that differs from a fixed workflow, and how to tell which one a task needs.
Checked against primary sources and independently reviewed on . Sources are listed at the end.
“AI agent” is now applied to almost anything built on a language model, from chat assistants to scripted automations to systems that work for hours with nobody watching. When one label covers all of that, it becomes hard to judge what a supplier is offering or what your own team should build.
This article sets out the working definitions used by the companies that build the underlying models. It explains the loop that every agent runs, shows how agents differ from the fixed workflows that handle a great deal of everyday automation, and ends with a short decision guide for whether a task really calls for an agent.
Two Definitions That Agree
Anthropic’s engineering guidance separates two kinds of system built on large language models (LLMs).1 In a workflow, a developer writes the path in advance: the model is called at set points and ordinary code decides what happens next. In an agent, the model itself decides which steps to take and which tools to use, and keeps control over how the task is carried out.
OpenAI’s guide for builders puts independence at the centre of its definition: an agent carries out work on someone’s behalf without being steered through each step. The guide names three parts that every agent has: a model that does the reasoning and makes decisions, tools the agent can call to fetch information or take action, and instructions that describe how it should behave and which limits it must respect.2
The wording differs but the core idea is the same. The test is who chooses the next step. If the code chooses, the system is a workflow, however capable each individual step may be. If the model chooses, within limits that people have set, the system is an agent.
| Workflow | Agent | |
|---|---|---|
| Who decides the next step | Code written in advance | The model, while the task runs |
| Number of steps | Set by rules in code, which may include branches and loops | Chosen by the model, so it varies from one task to the next |
| Best suited to | Repeatable tasks with a clear path | Open-ended problems where the path cannot be planned |
| Cost and speed | Easier to estimate and cap | Higher and more variable, because the model may take many turns |
| Testing | Each path can be tested directly | Needs evaluation across many varied runs |
| Example | Summarise each new support ticket and route it by category | Investigate a complaint across orders, emails and policy documents, then propose a fix |
The Agent Loop
Underneath, an agent repeats a simple cycle. It looks at its goal and at what it has learnt so far, chooses an action (usually a call to a tool such as a search, a database query or another service), and then reads the result. That result becomes new information for the next decision. The cycle carries on until the agent judges that the goal is met or something stops it.
This rhythm of reasoning, acting and observing was set out in the ReAct paper by Shunyu Yao and colleagues, first posted in 2022 and presented at ICLR 2023.3 The authors showed that letting a model alternate between written reasoning and actions helped it on question answering and interactive tasks. The loop described in this article follows that same basic shape.
- Receive The Goal
A person or another system states what needs to be achieved and any limits that apply.
- Plan The Next Step
The model reviews the goal, its instructions and everything gathered so far, then picks one action.
- Act With A Tool
The application runs the chosen tool, or for some built-in tools the model provider does. Examples include a search, a database lookup or a call to another service.
- Observe The Result
The output comes back to the model as new information. An error message is information too.
- Check Whether To Stop
If the goal is met, a limit is reached or a person needs to step in, the loop ends. Otherwise it returns to planning.
The final step deserves more attention than it usually gets. OpenAI’s guide describes an agent run as a loop that continues until an exit condition is reached, such as a particular tool call or kind of output, an error, or a maximum number of turns.2 An agent without a clear way to stop can repeat itself, run up costs, or keep acting long after it should have handed the task back to a person.
When A Simpler Design Is Enough
Both companies advise restraint. Anthropic recommends starting with the simplest approach that works, often a single well-designed model call, and adding agent behaviour only when it clearly improves the result. It also points out that agents accept higher cost and slower responses in exchange for better performance on hard tasks, so that exchange has to be worth it.1
OpenAI suggests agents for three kinds of work that have resisted ordinary automation: decisions that need judgement and involve many exceptions, rule sets that have grown too tangled to maintain, and tasks that depend on reading unstructured material such as documents, emails or conversations.2 Where none of these applies, a deterministic workflow is usually cheaper, faster and easier to check.
The flowchart below turns that advice into four questions. It is a starting point for discussion, and a team that answers it honestly will often find that a simpler design does the job.
Can the steps be written down in advance for nearly every case?
- Yes:
Does any step need judgement over unstructured text, such as reading a document or an email?
- Yes:
Use a workflow with model calls. Keep the path in code and call a language model only for the steps that need it.
- No:
Use ordinary automation. Rules or scripts will be cheaper, faster and easier to test.
- Yes:
- No:
Is a better result worth higher cost, slower responses and more testing?
- Yes:
Can you define when the task is finished and limit what the agent is allowed to do?
- Yes:
An agent is a reasonable fit. Start with one agent, a small set of clearly described tools and an explicit stop condition.
- No:
Not ready for an agent yet. Without a clear finish line and firm limits, an agent is hard to test and hard to trust.
- Yes:
- No:
Simplify the task first. Narrow the scope, or split the work into fixed steps, before reaching for an agent.
- Yes:
What Gives An Agent Its Abilities
A model on its own produces output such as text; it cannot look up live records or change anything in another system. For tools that a developer defines, the model does not run anything itself: it returns a structured request naming the tool and its inputs, and the surrounding application decides whether to carry it out. Some providers also run a few built-in tools, such as web search, on their own infrastructure, in which case the controls are the ones that provider offers.4 Anthropic calls the basic unit of agent systems the augmented LLM: a model connected to retrieval so it can look things up, to tools so it can act, and to memory so it can keep track of what it has learnt.1 The quality of those connections often decides how well an agent performs. Anthropic advises describing each tool carefully and testing how the model uses it, with the same care a team would give to a screen designed for human users.
Those connections are also what make agents consequential. A system that can send emails, change records or spend money needs permissions, monitoring and limits that a chat window never did. The security side of this is covered separately in Agentic AI Security. The next article in this series looks at tools, memory and the Model Context Protocol, the open standard many agents now use to reach outside data and services.
Footnotes
-
Anthropic, “Building effective agents”, 19 December 2024. anthropic.com ↩ ↩2 ↩3
-
OpenAI, “A practical guide to building agents”, April 2025. cdn.openai.com ↩ ↩2 ↩3
-
S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan and Y. Cao, “ReAct: Synergizing Reasoning and Acting in Language Models”, arXiv:2210.03629, October 2022 (ICLR 2023). arxiv.org ↩
-
Anthropic, “Tool use with Claude” (developer documentation), accessed 7 October 2026. platform.claude.com ↩
Knowledge Hub content is general information. It is not legal advice, a compliance certification, a guarantee of security or a substitute for an assessment of your own systems. Standards and rules change; check the sources for the latest position.