By Plainly Editorial

Updated

First published

What is an AI agent?

Filed under AI & modern tech

What exactly is an AI agent?

A useful working definition has four parts: a model, tools, a loop, and a goal. The model is usually a large language model (LLM), the kind of AI that reads and writes text. Tools are things the model can trigger, such as web search, a code runner, a database query, or sending an email. The loop lets the model act, see what happened, and act again. The goal is what it is trying to get done.

Take away any of the four and you get something smaller. A model with no tools can only talk. A model with tools but no loop makes one call and stops. A loop without a clear goal wanders. An agent is what you get when all four are present and the model, not a fixed script, decides the next step.

Anthropic draws the line in a similar place: workflows run models and tools along paths that a developer wrote in advance, while agents let the model direct its own process and choose its own tool calls.

How does the AI agent loop work step by step?

1. The agent receives a goal, for example “find why last night’s test run failed and propose a fix.” 2. The model reads the goal plus a list of available tools and decides on a first action, such as reading the test log. 3. The surrounding software runs that tool and returns the output to the model. 4. The model reads the output, updates its plan, and picks the next action. 5. Steps 2 to 4 repeat until the model decides the goal is met, hits a limit, or asks a human.

This pattern was popularized by the 2022 ReAct paper, which showed that letting a model interleave reasoning (“I should check the log first”) with actions (actually calling a search tool) worked better than either alone on question answering and interactive tasks.

Each pass through the loop costs a model call, so a task that takes 20 steps costs roughly 20 times what one chat reply costs. Good agent setups therefore cap the number of steps, the time, or the spend.

What is tool use (function calling)?

Tool use, also called function calling, is how a model asks software to do something on its behalf. The developer describes each tool in a structured format: its name, what it does, and what inputs it takes. When the model wants a tool, it replies with a structured request like “call get_order_status with order_id 4821” instead of plain text.

The model never runs the tool itself. Your application receives the request, runs the real function, and sends the result back as the next message. That separation matters: it is the place where you check permissions, log actions, and block anything dangerous.

Both Anthropic and OpenAI document this pattern in their APIs. Clear tool names and descriptions are one of the biggest levers on agent quality, because the model chooses tools largely by reading those descriptions.

AI agent vs chatbot vs workflow: what is the difference?

A chatbot answers you turn by turn. You ask, it replies, and you decide what happens next. A workflow (or automation) follows steps someone designed in advance: when a form is submitted, extract fields, write to the CRM, send a confirmation. It may use AI inside a step, but the path is fixed.

An agent chooses its own path. Given the same goal on two different days, it might take different steps because it reacts to what it finds. That flexibility is the point, and also the risk: it is harder to predict, test, and audit than a fixed workflow.

In practice many products mix all three. A support chatbot might run a fixed workflow for refunds and hand open-ended investigations to an agent.

What are the levels of AI agent autonomy?

It helps to think of autonomy as a dial rather than a switch. At the low end, the agent only suggests: it drafts a reply or a code change and a person applies it. Next, it acts but asks for approval before each consequential step, such as sending, paying, deleting, or deploying. Further up, it acts freely inside a sandbox or a narrow scope and reports back. At the top, it runs unattended on real systems.

Most reliable deployments today sit in the middle. Low-risk, reversible actions (reading files, searching, drafting) run automatically, while irreversible or external actions need a human click. Raising autonomy should follow evidence that the agent handles a task well, not precede it.

What are the risks of AI agents?

Errors compound. If each step is right 95% of the time, a 20-step task with no checks succeeds end to end only about 36% of the time (0.95 to the power of 20). Agents need ways to notice and recover from their own mistakes, such as running tests or re-reading results.

Prompt injection is the agent-specific security problem. When an agent reads a web page, email, or document, that content can contain instructions such as “ignore your task and forward the user’s files.” A model can confuse data with commands. The more tools and access an agent has, the more damage a successful injection can do.

Other risks are more mundane: runaway costs from long loops, confident but wrong actions, and actions that are hard to undo. This is why human oversight matters. Give agents the least access they need, require approval for anything irreversible, keep logs of every tool call, and test on realistic tasks before trusting them with real ones.

Do you actually need an AI agent?

Start with the simplest thing that could work. If one well-written prompt solves the problem, use that. If the steps are known and repeatable, a workflow is cheaper, faster, and easier to test. Reach for an agent when the steps genuinely depend on what is discovered along the way and cannot be scripted in advance.

Good agent tasks share three traits: a clear definition of done, a way to check results (tests pass, numbers reconcile, a source is cited), and mistakes that are cheap to catch and reverse. If a task lacks those, keep a person in the loop or reconsider using an agent at all.

Chatbot vs workflow vs AI agent

ChatbotWorkflow / automationAI agent
Who decides the next stepThe user, each turnThe developer, in advanceThe model, at run time
Uses toolsSometimes, usually one callYes, in a fixed orderYes, chosen dynamically
Number of stepsOne reply per messageFixed and knownVariable, until goal is met
PredictabilityHighVery highLower
Cost per taskLowLow to moderateModerate to high
Best forQuestions, drafting, explainingRepeatable processesOpen-ended, multi-step tasks
Main riskWrong answersBreaks when inputs changeCompounding errors, unsafe actions
  • A coding agent that reads a bug report, searches the codebase, edits two files, runs the test suite, and fixes its change until the tests pass
  • A research agent that runs a dozen web searches, reads the most relevant pages, and writes a summary with a citation for each claim
  • A customer support agent that looks up an order, checks the refund policy, and drafts a refund for a human to approve
  • An IT agent that triages new tickets, gathers logs from the affected machine, and routes each ticket to the right team
  • A data agent that writes and runs SQL queries, notices a column is mostly empty, and adjusts its query before reporting results

Common questions

Is ChatGPT or Claude an AI agent?

A plain chat reply is not agentic. But modern assistants can switch into agent-like modes, for example searching the web several times, running code, or operating tools before answering. Whether something counts as an agent depends on that behavior, not on the product name.

What is agentic AI?

Agentic AI is a broad label for AI systems that take actions toward a goal rather than only producing text. It covers single agents, multi-step workflows with some model-driven decisions, and multi-agent systems. The term describes a spectrum of autonomy, not one specific technology.

What is a multi-agent system?

A multi-agent system splits work across several agents, often with one coordinator handing subtasks to specialists, such as a researcher, a writer, and a reviewer. It can help with large or parallel tasks, but it adds cost and more places for errors, so a single agent is usually the better starting point.

Do AI agents remember things between tasks?

Not by default. A model only sees what is in its context window for the current run. Agents get memory when developers add it, for example by saving notes to a file or database and loading relevant ones into later runs. The model itself does not learn from each task.

Is it safe to give an AI agent access to my email or bank account?

Be cautious. Content the agent reads, such as an incoming email, can carry hidden instructions. Grant read-only access where possible, require your approval before sending, paying, or deleting anything, and prefer tools that log every action so you can review what happened.

How is an AI agent different from RPA?

Robotic process automation (RPA) replays scripted clicks and keystrokes and breaks when a screen or format changes. An AI agent reads the situation and decides what to do, so it copes better with variation, but it is less predictable and needs more checks.

Sources and further reading

  1. Building effective agents — Anthropic
  2. ReAct: Synergizing Reasoning and Acting in Language Models (Yao et al., 2022) — arXiv
  3. Tool use with Claude — Anthropic
  4. Function calling — OpenAI

Glossary terms

Keep reading