You need a monitor that costs less than $250 and arrives by Friday. A chatbot might tell you what to look for. A shopping workflow might filter a catalog by price and delivery date. But what happens if the best candidate has no delivery date listed? An AI agent could spot the gap, check a second source and use the answer to decide whether to recommend it.
All three systems can use tools. What sets them apart is who chooses the next step. This guide looks at agents built with language models, how their decisions work and when a simpler approach is enough.
What are AI agents?
An AI agent is software you give a goal to. It works out which steps to take, checks what happened and uses that information to decide what to do next. The people building the application set its limits, including which tools it can use and when it has to stop.
Many modern agents use a large language model (LLM) to interpret a request and select actions. In the broader AI literature, the term “agent” also covers rule-based systems, as the AWS overview of AI agent types explains. Here we focus on the distinction used for modern LLM applications: the model directs the task rather than merely generating text inside a predefined sequence.
Anthropic’s engineering essay Building effective agents distinguishes predefined workflows from systems where the model controls the path and tool selection. OpenAI’s practical guide to building agents similarly emphasizes model-led execution, tool access and boundaries. Both are useful starting points for thinking about agency without relying on marketing labels.
AI agents vs. chatbots and automated workflows
The same chat window can support several kinds of software. A conversational interface does not tell you how the underlying system works, and a chatbot that searches a knowledge base is not automatically an agent.
| System | Who controls the steps? | Example |
|---|---|---|
| Chatbot or assistant | Typically responds to user requests; may call retrieval tools. | Answers a question about the return policy. |
| Fixed workflow | Software rules or predefined branches choose the sequence. | Looks up an order, checks the return window and routes the result. |
| AI agent | The model chooses the next permitted action based on the goal and current results. | Investigates an incomplete return request, looks up relevant records and prepares a recommendation. |
These designs can overlap. You can talk to an agent through a chat window. You can also give an agent one task inside a workflow that checks every result against fixed rules. To tell which design you’re looking at, ask who chose the last step and who gets to choose the next one.
Our Python chatbot tutorial shows how to build a chat interface. In that tutorial, you decide what to ask next.
How do AI agents work?

A typical tool-use loop. The model selects the next step, while the application enforces permissions and stopping conditions.One user request can lead to several actions. A tool result may answer the question, reveal something worth checking or show that the agent needs help. The application can stop the run whenever it reaches a limit.
The basic decision loop starts with a goal. Here’s what happens when the agent needs a tool.
- Goal. Give the agent an outcome and the limits it must respect. Here, the monitor must arrive by Friday and cost less than $250.
- Decide. The model chooses the next step. It might check a price, look up delivery or ask you for a detail it needs.
- Act. The application checks that the tool call is allowed, then runs it.
- Observe. The agent reads what the tool returned. A date, a blank field and an error each mean something different.
- Evaluate. Does the result settle the question? If evidence is missing and another check is allowed, return to Decide.
- Stop / hand off. Give the answer and its supporting evidence, or explain what is missing when the agent needs help or reaches a limit.
Suppose an agent says it found a monitor in stock. What did the inventory tool actually return? A stock count supports the answer. A timeout leaves the question open.
The main components of an AI agent
| Component | Role |
|---|---|
| Model | Interprets the task and selects actions or produces an answer. |
| Instructions | Define the objective, scope, decision rules and output format. |
| Tools | Expose approved capabilities, such as looking up an inventory record or calculating totals. |
| State | Maintains the current task context, completed steps and observations. |
| Application controls | Enforce permissions, input validation, step limits, approvals and stopping conditions. |
State is the information the agent keeps while it works. For a shopping task, it might be a shortlist and the prices it has already checked. Once you have your recommendation, the application may have no reason to keep that list. Permanent memory, extra models and teams of agents are optional.
A practical example: finding a suitable monitor
Return to the office monitor. The task is to recommend the cheapest in-stock option under $250 that arrives by Friday. The agent can read the catalog and check delivery estimates. It has no purchasing access. These fictional inventory records show what it sees first.
| Option | Total price | Stock and delivery |
|---|---|---|
| A | $185 | Out of stock |
| B | $229 | In stock. Delivery date missing. |
| C | $249 | In stock; Monday (too late) |
| D | $270 | In stock; Wednesday |
Here’s one way the agent could handle the missing date.
- Read the catalog. A is out of stock, C arrives the following Monday and D costs too much. B fits the budget, but its blank delivery field leaves one question open.
- Choose a follow-up. The delivery tool can look up B by its catalog ID, so the agent checks there. In this example, it returns Thursday.
- Recommend B at $229, arriving Thursday. Include the catalog price and the separate delivery estimate so the buyer can check both.
- If the delivery tool needs a destination first, ask for the delivery ZIP code. If it still cannot provide a date, explain that delivery by Friday is unconfirmed.
The important decision comes when B’s catalog entry is incomplete. The agent has to decide what evidence would settle the question. If every missing date can be resolved with the same delivery lookup, you can write that rule once and use an ordinary workflow. An agent earns its place when different requests call for different follow-ups.
Where AI agents can be useful
Look for tasks where the goal is clear but the route depends on what turns up. Here are four examples and a sensible stopping point for each.
| Use case | What the agent might do | Human or system boundary |
|---|---|---|
| Customer support | Collect missing order details, locate the relevant policy, draft a response or route an exception. | Require review for refunds or account changes. |
| Research and reporting | Locate approved documents, identify missing evidence, compare findings and draft a sourced brief. | Check important claims against the documents before publication. |
| Internal operations | Investigate incomplete requests, check approved records and prepare an exception summary. | Do not allow the agent to alter business records without the required validation. |
| Software development | Inspect a documentation task, propose edits and run relevant checks in an isolated environment. | A developer reviews changes before they are accepted. |
For a documented example, GitHub’s Copilot documentation describes model-led repository work, proposed changes and testing, with review before changes are accepted. That is a more concrete illustration of agentic work than a claim that software can independently deliver an entire project. Capabilities depend on the product and its configuration.
When an AI agent is unnecessary

Choose the simplest system that meets the task requirements. Greater autonomy should have a specific purpose.Could you write down the steps in advance? If so, try that first. Every extra model call or lookup adds time, can cost money and gives the system another chance to make a mistake.
Start with the simplest design that does the job. A summary may take one prompt. A policy question may take one lookup and a reply. Consider an agent when it needs to choose how to investigate and you have a way to check the answer.
- Single response: Summarize a supplied document or explain a known concept.
- Fixed workflow: Calculate invoice totals and route an invoice according to a stable approval policy.
- Agent with limits: Investigate an incomplete request across approved sources when its missing information cannot be identified beforehand.
You can also combine the two. A workflow might send an unusual request to an agent for investigation, then check the agent’s recommendation against ordinary rules before anyone acts on it.
Limitations and evaluation
An agent can pick the wrong tool, misread an answer or keep trying a step that has already failed. It can also mistake instructions in a document it reads for directions from the user. That’s called indirect prompt injection. A supplier’s listing can provide a price, but it has no authority to change your budget or approve a purchase. OWASP lists prompt injection first in its 2025 Top 10 for LLM applications.
Watch what happens when the information runs out. A system that recommends the right monitor with complete records can still guess when the delivery tool goes offline. That second case belongs in your tests.
Set limits the application can enforce
- Grant only the data and actions necessary for the task; start with read-only access when it is sufficient.
- Validate tool arguments and verify outcomes using authoritative records. Enforce permissions outside the model rather than relying on instructions alone.
- Set a maximum number of steps, an execution time or cost budget, and a clear escalation path.
- Require human approval for sensitive, irreversible or costly actions.
- Keep enough trace information to investigate errors while avoiding unnecessary retention of sensitive data.
For help writing instructions that spell out the goal and the answer you need, see our practical prompt engineering guide. But good prompts do not replace access controls or validation.
How to test an agent
Start with a small set of realistic tasks and known expected outcomes. Here are example acceptance checks for the monitor scenario. Use them to check what the system actually does.
| Test case | Expected behavior |
|---|---|
| Normal request | Recommend B with the correct $229 total and Thursday delivery. |
| No qualifying stock | Report no qualifying option rather than inventing availability. |
| Delivery still unknown after lookup | Ask for clarification or report that delivery cannot be verified. |
| Catalog lookup fails | Return an honest error or stop within the retry limit. |
| Purchase requested | Decline to purchase because the system is read-only. |
For each run, record the outcome, the evidence behind it, how long it took and what it cost. Count incorrect answers, attempts to exceed permissions and requests for human help separately. Asking for help when a delivery date is missing can be the correct outcome. Repeat the same cases and compare the results with a fixed workflow.
AI agent frameworks: where to start
The underlying concepts matter more than the framework. The following official documentation was checked on November 27, 2026. These are examples, not a ranked comparison or a hands-on benchmark.
- OpenAI Agents SDK — a Python library with an agent runtime, tools, handoffs and tracing.
- LangGraph — a lower-level orchestration runtime for stateful tasks, explicit control flow and durable execution.
- Google Agent Development Kit (ADK) — a development framework for constructing, running and evaluating agents across supported languages.
Choose the tool that helps with the part you actually need, such as keeping track of progress or pausing for review. You can learn the decision loop with one model and a couple of read-only tools.
Frequently asked questions
Does an AI agent need multiple agents or permanent memory?
No. A single agent can carry out a task using temporary context and a small tool set. Multiple agents and persistent memory are optional design choices, useful only when they solve a specific problem.
Can an agent learn while working?
An agent can use new observations to change its next action without retraining the underlying model. Storing feedback or updating model weights is a separate process; it should not be assumed to happen automatically.
Can an AI agent work without human supervision?
Yes, for some tasks. You might let an agent look up delivery dates on its own while keeping purchases under your control. Decide where a person should step in by considering what a mistake would cost and how easily you could catch it.
The bottom line
Think back to the missing delivery date. If one lookup always settles the question, write that lookup into a workflow. If the right follow-up depends on what the agent discovers, give it the tools to investigate, a way to show its evidence and a clear place to stop.
Sources
Checked as of November 27, 2026.
- Anthropic, Building effective agents
- OpenAI, A practical guide to building agents
- Amazon Web Services, What are AI agents?
- GitHub Docs, GitHub Copilot on GitHub.com and GitHub Mobile
- OWASP, LLM01:2025 Prompt Injection
- OpenAI, OpenAI Agents SDK for Python
- LangChain, LangGraph overview
- Google, Agent Development Kit