AI glossary
What is AI agent?
Also called LLM agent, autonomous agent, agent ·
An AI agent is software that uses a language model to pursue a goal by deciding its own steps, calling tools such as search, code or business APIs, observing the results and repeating until the task is done or it needs a human.
How it works
At its core an agent is a loop:
- The LLM receives a goal, instructions in a system prompt, and a list of tools it may use.
- It decides the next step and, through function calling, asks to run a tool, for example "search the CRM for invoices over 90 days".
- The surrounding code (the agent harness) runs the tool and puts the result back into the model's context.
- The model reads the result and decides again: another tool, a question for the user, or a final answer.
The 2022 ReAct paper showed the value of interleaving reasoning and actions this way. Tools can be local functions, APIs or servers exposed through the Model Context Protocol. Many agents also have memory between sessions and limits on how many steps or how much money they may spend.
Anthropic's widely cited definition separates workflows, where LLMs and tools follow predefined code paths, from agents, where the LLM dynamically directs its own process and tool use.
Why it matters
- From answers to actions. Agents can complete work, such as fixing a bug, reconciling a report or booking a meeting, rather than only advising.
- Reliability compounds. Small error rates multiply across many steps, so evaluation, logging and human checkpoints matter.
- Security is different. An agent with tools can be manipulated by content it reads (prompt injection) and act on it, so least-privilege access and guardrails are essential.
- Often a workflow is better. If the steps are known in advance, a fixed workflow is cheaper and more predictable than an agent.
Example
A coding agent gets "the checkout test is failing". It runs the test suite, reads the error, opens the relevant file, edits a function, re-runs the tests, sees them pass, and proposes the change as a pull request for a person to review.
Questions people ask
Is ChatGPT an AI agent?+
Plain chat is not: it answers and waits for you. ChatGPT becomes agent-like when it uses tools on its own to complete a multi-step task, such as browsing several sites and filling in a form, which is what its agent features do.
Is it hard to build an AI agent?+
A basic agent is a loop of a model call, a tool call and a check, and can be built in an afternoon with an SDK. Making it reliable, safe and affordable in production is the hard part.
Related terms
Sources
- Building effective agents, Anthropic (December 2024)
- ReAct: Synergizing Reasoning and Acting in Language Models, arXiv (Yao et al., 2022)
Go deeper
AI AgentsHow to Build an AI Agent: A Step-by-Step Guide With Python and No-CodeHow to build an AI agent in 7 steps: pick a task, define tools, write instructions, add limits and approvals. Working Python code, a free local option and n8n. · 10 min read
AI AgentsAI Agents vs Agentic AI: What's the Difference?An AI agent is one system that pursues a task with tools; agentic AI is the wider approach of letting models plan and act. The difference, a table and examples. · 8 min read