Monday morning, and the weekly report still needs someone to open three systems, copy the numbers by hand, and fix what doesn't match. An AI agent is a program that uses a language model to choose its next step and to use tools, such as search or your CRM. It decides which function to call and what to do with the result, rather than following a fixed script. This page explains what an agent is, the choices that follow from that definition, and how to keep one working in production. It is one part of the AI agents topic map.
In short
- The common mistake is treating an agent like a better chatbot when it is really a loop that picks tools and acts on what they return, so the model alone does not make it useful.
- An AI agent is a program in which a language model decides the next step and calls tools with the results it gets back [1][3].
- Agents win where rules are brittle: a fraud check that follows a checklist misses the transaction that looks wrong without breaking a rule [1].
- Guardrails and human approval are part of the design, not an add-on after launch [1][7].
- Most agent failures in production trace back to context debt—the gap between what the agent assumes your data means and what your business actually means—rather than to the model choosing badly [8].
- Tools are the fragile part: schema changes, expired authentication and rate limits break agents even when the model behaves [7].
- The result you get is a process that handles ambiguous work end to end and hands a person only what truly needs a decision [1][3].
At a glance
| Fact | Detail |
|---|---|
| Core of an agent | A language model that plans and calls tools [4] |
| What makes it different from a plain LLM | Tool calling for current information and multi-step subtasks [4] |
| What can break it in production | Bad tool data, schema changes, rate limits, expired auth [7] |
| What most failures trace back to | Context debt: a gap between what the agent assumes and what the business means [8] |
| Default guardrail model in the Agents SDK | Optimistic execution, where guardrails run alongside the agent [1] |
| Share of companies running fully autonomous agents in production | Seven percent report significant financial losses [6] |
What an AI agent actually is
An AI agent is a program that uses a language model to pick the next step and to call tools, so the model decides what to do next instead of following a fixed script. That definition comes from two parts: the model as the "brain", and tools as external functions it can call [5][3]. The model interprets the instruction, reasons about a solution, and decides when to retrieve memory or call a tool [5].
The old way was a workflow. Someone mapped every branch and edge in advance, and the system ran the chart. Before: a decision tree with a rule for each case. After: a model that reads the situation and chooses the tool. The agent's advantage shows up exactly where the chart runs out. An LLM agent works more like a seasoned investigator than like a checklist, evaluating context and catching what clear-cut rules miss [1]. That is the whole difference, and it is also the source of its risk.
The components are consistent across vendors. An agent perceives its environment, makes decisions, and takes actions to reach a goal [5]. It keeps memory across sessions, from chat history to customer data, and it uses tools to act beyond words: retrieving data, sending email, running code, querying a database [3]. A model does the reasoning; memory gives it context; tools give it reach.
The loop behind the answer
The agent runs a loop. It reads the request, decides whether a tool is needed, calls the tool, reads the result, and decides again until the task is done. Tool use is guided by the model through planning and parsing modules that format the call and interpret the output [3]. You don't write the branches; you write the tools, the instructions, and the limits.
That changes what you have to test. With a workflow, you test each branch. With an agent, the set of paths is open, so you test the guardrails and the tools instead. The Agents SDK treats guardrails as a first-class concept, running them concurrently with the agent and raising an exception when a constraint is breached [1]. Start with a single agent, and only move to several when the task really splits [1].
What it can do that a workflow can't
The agent handles ambiguity and multi-step tasks end to end [1]. A workflow can reset a password when it sees a keyword; an agent can investigate why the login failed. AI agents independently choose the best actions to achieve predetermined goals, which suits tasks like resolving customer queries [3]. The gain is real, but it only shows on work where the rules keep missing cases.
A useful test before you build: can a competent new hire do this task with the same tools and a written brief? If yes, an agent is a fit. If the task needs a fixed sequence every time with no judgement, a workflow is cheaper and easier to debug.
AI agent or agentic AI: which do you need?
An AI agent is one program with a model and tools; agentic AI is the broader label for systems that act with autonomy, and you usually need the single agent first. The market uses "agentic AI" for everything from one assistant to a fleet of agents, so the term tells you little. The useful question is how many agents and how much autonomy.
Single agents suit well-defined tasks that don't need collaboration, and each runs on one foundation model [2]. Multi-agent systems let several agents collaborate or compete, each possibly on a different model [2]. An orchestrator agent coordinates specialist agents and passes data between them [3]. More agents add coordination cost, and multi-agent systems built on one foundation model can share the same pitfall and fail together [4]. Start with one agent and grow only when the task splits cleanly [1].
The practical rule: build the single agent, measure where it stalls, and add a second agent only when a sub-task has its own tools and its own owner. If the two agents need the same data and the same rules, they should be one agent with more tools.
Is ChatGPT already an AI agent for you
ChatGPT and similar chat tools can call tools and run multi-step tasks, but a chat product is not your agent until it runs on your data and your systems. The assistant in a chat window works with what you paste or connect. Your agent works with your CRM, your order system and your knowledge base, under your rules.
The difference matters for the parts you have to own: access, audit and cost. An agent that inherits an employee's file permissions can reach data that employee never needed [6]. A chat tool doesn't put your approval step in the loop. If your task is "summarize this document", a chat tool is enough. If it is "resolve this ticket using our policies and our order data", you need an agent you build and run.
Where agents win and where they cost you
Agents win on messy, multi-step work where the rules keep missing cases. Payment fraud analysis is the standard example: a rules engine flags preset criteria, while an LLM agent evaluates context and spots suspicious activity even when no rule is broken [1]. Agents are also a fit where the input is unstructured or the rules are brittle [1].
They cost you on the operations side. Agents make many API calls to finish one complex task, and naive integrations hit strict rate limits [6]. Integration with legacy systems that lack modern APIs is a real barrier [6]. Autonomous operation creates security gaps that traditional controls weren't built for [6]. Every win on the task side comes with work on the plumbing side.
| Task shape | Better choice | Why |
|---|---|---|
| Fixed sequence, no judgement | Workflow automation | Cheaper, testable, no model risk |
| Ambiguous cases, several tools | AI agent | Model reads context and picks the step [1] |
| High-volume routine, one system | Script or rule | No model cost, no hallucination |
| Unstructured input, decisions | AI agent | Handles text and judgement [1] |
How to choose your first agent
Choose the first agent by the task, not the model: pick one job with clear success, a few tools, and a person who already does it well. The model is the easy part to swap later. The task, the tools and the reviewer are what you will live with.
- Write down the task in one sentence, as the person who does it now would describe it.
- List the tools it needs. If the list is longer than a handful, split the task.
- Name the success check: what a correct output looks like, and who confirms it.
- Decide the approval point: which actions run without a person, and which wait for one.
- Pick a model that is good enough for the reasoning and cheap enough for the volume.
Start with a single agent and a small tool set [1]. In case of failure, an agent can halt execution and transfer control back to the user [1]. Keep the human approval step where the cost of a wrong action is high, because the dominant production model still routes decisions to human queues [6].
Running it without surprises
Running an agent means watching the tools and the context, not just the model, because those are where it breaks. Agents depend on APIs, browsers, CRMs and internal systems, and each dependency adds a failure point: schema changes, malformed outputs, expired authentication, rate limits, timeouts [7]. Stale ERP pricing can lead an agent to generate the wrong quote even when the model behaves [7].
The fix is the boring one. Validate tool outputs before the agent acts on them. Treat authentication as part of the agent's health, not a one-time setup. Cap the number of calls per task so a loop can't run up the bill. Put a rollback path on any action that writes data, since an agent that overwrites a record is harder to undo than a wrong answer.
Context is the other half. Most production failures trace to context debt: the gap between what the agent assumes your data means and what the business means [8]. Build a shared definition layer before you add the second agent, because the second agent rebuilds its own context store and recreates the silo problem at agent scale [8]. The Sales Analyst and the Procurement Advisor should read the same definition of "active customer" [8].
For the infrastructure side, keep the agent's code in a container and run it as a service with a stable endpoint, so scaling and deployment follow the same path as the rest of your stack [2]. The AI agent production infrastructure guide covers the deployment side in depth. A canary deployment for AI agents lets you test a new prompt or tool on a slice of traffic before it reaches everyone.
Monitoring deserves its own plan. Log the tool calls, the inputs and the outputs, and keep the reasoning path where you can, so a wrong answer can be traced back to the data it used [8]. The AI agent monitoring and observability tools field guide compares the options.
What drives the cost of an agent
Cost is driven by the number of model calls and tool calls per task, not by the number of users, because an agent loops where a workflow ran once. Each step is a model call, and each tool is an API call that may carry its own fee. Autonomous agents make high volumes of API calls to finish a single complex task [6]. A task that takes eight steps costs roughly eight times the tokens of a single-shot answer, before you count retries.
Three levers keep the bill down. First, route cheap: send simple queries to a small model and escalate only the hard ones, the pattern that cut contract review time from 90 minutes to 45 for an insurance client while keeping decisions auditable [4]. Second, cap the loop with a maximum number of steps per task. Third, cache the context the agent fetches every run, so it doesn't refetch the same knowledge base on every call.
Cost estimates also go wrong on the planning side. Most organizations misestimate AI costs, with 85% off by more than 10% [6]. The real cost of AI agent architecture on AWS walks through where the money goes. If your volume is spiky, the serverless versus containers cost comparison is the right read before you commit.
The mistakes that sink an agent
The mistakes that sink an agent are predictable, and most are about context and tools, not the model. Five reasons recur: inconsistent answers across systems, confident but wrong outputs, tests that pass while production breaks, agents that can't scale past one use case, and adoption that stalls because nobody trusts outputs they can't trace [8].
- Testing on imagined questions. Test coverage built on anticipated queries misses the questions the business actually asks; the signal sits in the dashboards and reports the team already uses [8].
- No shared definitions. Without a definition of "churn" or "active customer", the model fills the gap with the most probable answer, which is hard to tell from a correct one [8].
- Too much privilege. Most agents in enterprise deployments hold more access than they need, creating a gap between the configuration and the real authority [6].
- Skipping the approval step. A business case assumes full automation, but the dominant model routes decisions to a human queue, so the case breaks [6].
- Ignoring tool failures. Bad tool data drives bad actions even when the model is right [7].
The fix for each is unglamorous: simulate against the real questions before launch, build the definition layer first, give the agent only the tools it needs, design for human approval, and validate every tool response.
When this is the wrong choice
An agent is the wrong choice when the task is fixed, the data is clean, or the cost of a wrong action is high and unmonitored. Four cases:
- The task is a fixed sequence. If the steps never change, a workflow is cheaper and easier to test. The agent adds model cost and variance for no gain.
- The work needs deep empathy. Tasks that need nuanced emotional understanding, like therapy or conflict resolution, are where agents struggle [2]. Keep a person in front of the customer.
- You need full auditability and the agent can't explain itself. Complex models may lack explainability, and justifying decisions to a regulator becomes hard [6]. Use a rules-based system where every decision must be traced.
- You want full automation on day one. Only 7% of companies run autonomous agents in production, and 95% of companies investing in AI agents see zero return [6]. If the case assumes no human in the loop, it is not ready.
In each case, do the smaller thing: a workflow, a rules engine, or an agent that drafts and routes to a person.
How to check in your own system
Check whether your agent is ready by looking for five signs that would change the answer, then run the cheapest check this week.
Signs that would change your answer:
- The same question gets different answers on different days.
- A wrong answer reached a stakeholder and nobody could trace where it came from.
- Your tests pass but production queries fail.
- The agent holds file permissions it doesn't need.
- Most runs end in a human queue, not an automated action.
The cheapest check this week:
- Pull last week's agent logs and pick the ten questions users actually asked most.
- Run those ten through the agent and compare answers to the correct ones.
- Open one failed run and follow the tool call that returned bad data.
- Check one schema change or expired token in the last month against your tool list.
- Read one line of the bill and divide it by the number of completed tasks.
If the ten answers match and the failed run traces to a tool, you have a tool problem to fix. If the answers differ on the same question, you have context debt, and the shared definition layer comes before any new agent.
Key terms
AI agent: A program that uses a language model to choose its next step and call tools to reach a goal [1].
Large language model (LLM): The "brain" of the agent that interprets instructions, reasons about a solution, and decides which tool to call [5].
Tool: A function or external resource, like search or your CRM, that the agent calls to act beyond words [3].
Orchestrator agent: An agent that coordinates specialist agents and passes data between them to complete a larger task [3].
Guardrail: A check that runs alongside the agent and stops it when a constraint is breached [1].
Context debt: The gap between what the agent assumes your data means and what the business actually means [8].
Single agent: One agent that works alone on a defined task with one foundation model [2].
Multi-agent system: Several agents that coordinate, or compete, each possibly on a different model [2].
Decision trace: A record of the data and rules behind an agent's answer, used to audit and debug it [8].
Common questions
What is an AI agent in simple terms?
An AI agent is a program that uses a language model to decide its next step and to call tools. Instead of following a fixed script, it reads the situation, picks a tool, and uses the result to decide again.
How is an AI agent different from a chatbot?
A chatbot answers in a conversation; an AI agent takes actions through tools and runs multi-step tasks. The agent can query your database, update a record, or route a case, and it keeps memory across sessions [3].
Do I need a multi-agent system?
Most teams should start with a single agent. A multi-agent system fits when the task splits into sub-tasks with their own tools and owners, but multiple agents on one foundation model can share the same failure and fail together [4].
What breaks AI agents in production?
Tool failures break agents most often: schema changes, expired authentication, rate limits and stale data [7]. Context gaps break them next, where the agent fills missing definitions with a confident but wrong answer [8].
Can an AI agent work without a human in the loop?
An AI agent can run without approval on low-risk actions, but most production deployments still route decisions to a human. Only a small share of companies run fully autonomous agents, and the dominant model keeps an approval step [6].
How do I estimate what an agent will cost?
Count the model and tool calls per task, then multiply by your token and API rates. Agents loop, so a multi-step task costs several times a single answer, and most teams underestimate the total [6].
What is context debt in an agent?
Context debt is the gap between what the agent thinks your data means and what it really means. It builds during development and surfaces when a wrong answer reaches someone or a record gets overwritten [8].
When should I not use an agent?
Skip the agent when the task is a fixed sequence, the work needs deep empathy, or every decision must be fully explainable [2][6]. A workflow or a rules engine is the cheaper, safer choice in those cases.
References
- A Practical Guide to Building AI Agents | OpenAI
- What are AI agents? Definition, examples, and types
- What are AI Agents?- Agents in Artificial Intelligence Explained - AWS
- What are AI agents? - IBM
- Agents in AI - GeeksforGeeks
- What Are The Main Problems and Limitations With AI Agents For Business
- AI Agent Failures: Common Breaks in Business Workflows 2026
- Why AI Agents Fail in Production: 5 Root Causes (2026)
