What is an AI agent?
An AI agent is a software component, usually built on a large language model, that plans steps towards a goal, calls tools and picks its next step from the results.
Also called an LLM agent, it builds on the intelligent agent of classic AI. Unlike a chatbot, which only answers, an agent calls tools, assesses the results and can act in connected systems.
- Topic
- Agents and protocols
- Also known as
- LLM agent, intelligent agent
How an AI agent works
- The system prompt, the user's goal, the conversation history and the available tool definitions are loaded into the context.
- The model produces the next action: either a direct answer or a tool call.
- The agent runtime runs the tool and feeds the result or error back as an observation; the model then updates its plan (the agent loop).
- State and memory carry over between steps; the loop ends when the goal is met, a step limit is hit or human approval is needed.
In more detail
Standard tool and agent protocols (MCP and A2A)
Modern production agents rely on standardised protocols rather than bespoke wrappers: the Model Context Protocol (MCP) provides a uniform interface for discovering and calling tools and data sources, while agent-to-agent protocols (such as A2A) coordinate task handoffs across specialised agents.
Memory architecture and context management
Agent memory extends beyond the active context window: short-term working state tracks the current trajectory, while external long-term memory (semantic, episodic and procedural stores) preserves facts and past outcomes across sessions. Without active context compaction or state pruning, multi-step tool outputs quickly degrade reasoning and inflate inference cost.
Agent-specific failure modes, sandboxing and prompt injection
Agents exhibit distinct failure modes compared with single-turn models: infinite retry loops, hallucinated tool parameters, cascading multi-step errors and goal hijacking via indirect prompt injection in tool outputs. Safe deployments isolate code or shell execution inside sandboxes and enforce deterministic validation before any state-changing action.
Trajectory-based evaluation and reproducible testing
Evaluating an AI agent requires trajectory-level testing rather than final-answer checks alone: teams measure end-to-end task completion rate, tool-selection precision, loop efficiency and cost per task inside deterministic mock or sandbox environments.
Commonly confused terms
| Term | How it differs |
|---|---|
| Agentic workflow | An agentic workflow executes a predefined sequence or graph of LLM and tool steps designed in advance. An AI agent decides dynamically in a loop which tools to call and what step to take next based on intermediate observations. |
| Tool calling | Tool calling (function calling) is a single model capability that emits a structured request to run an external function. An AI agent is the broader software system wrapping that capability inside memory, planning, environment feedback and termination logic. |
Why an AI agent matters for on-premises AI
In-house, each agent gets its own identity and, under least privilege, reaches only the tools and data it needs. Logging every tool call and decision lets auditors and incident responders trace the chain of actions; critical operations need human approval. Agents that reach ERP, CRM or knowledge bases run on the internal network, so transaction data stays inside. Each step is a separate model call, so GPU load and latency are far higher than in a simple chat.
A legal department's agent searches the contract archive, summarises the relevant clauses and passes them to a lawyer for approval without changing any document.
Common questions
Does connecting a search tool to a language model make it an agent?
Not on its own. An agent needs an iterative loop in which the model observes, plans and chooses actions.
Does an AI agent work on its own?
With limited autonomy. In enterprise use its tool permissions are restricted and human approval is required at critical steps.
Related terms
- Tool calling
- Agent memory
- Human-in-the-loop
- Agent loop
- Agentic AI
- Agent runtime
- Agent planning
- Model Context Protocol
- AI approval gate
- Reasoning and Acting
- AI assistant
- Chatbot
Sources
- Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models, 2022
- Schick et al., Toolformer: Language Models Can Teach Themselves to Use Tools, 2023
- Russell and Norvig, Artificial Intelligence: A Modern Approach, Chapter 2: Intelligent Agents
Related page on this site: Related FAQ · In the glossary: Glossary, A to D