# AI Agent

> Autonomous software system that perceives, reasons and acts in a loop to reach a goal, driven by an LLM.

- **Category**: AI
- **URL**: https://www.romaindelfosse.fr/en/glossary/ai-agent/

---

An **AI agent** is an autonomous software system built around an LLM (large language model) that perceives its environment, reasons about a goal and executes actions in a loop until it reaches it. Unlike a chatbot, which answers a question and stops, an agent plans, uses external tools and corrects its course on its own.

## Technical definition

### The ReAct cycle

An agent runs on the **ReAct** loop (Reasoning + Acting), formalized by Yao et al. in 2022. At each iteration, the LLM analyzes the situation (reasoning), decides on an action to execute (acting), observes the result, then starts over. The cycle repeats as long as the goal hasn't been reached.

### The four core building blocks

What sets an agent apart from a plain LLM is four components added to the language model:

- **Memory** — Short-term storage (session context) and long-term storage (persistent vector database). It lets the agent build on past actions and stay consistent over long missions.
- **Tools** — Functions the agent can call: external APIs, web search, code execution, reading/writing files, SQL queries. These are the agent's operational "arms."
- **Planning** — Autonomously breaking a complex goal down into sequential or parallel sub-tasks. The agent builds its own action plan.
- **Action** — Actual execution in the real world. This is what concretely separates an agent from a model that merely generates text.

## Architectures

### Single agent

A single agent equipped with several tools handles sequential tasks. Suited to simple workflows: research → analysis → writing.

### Multi-agent

Several specialized agents coordinated by an orchestrator. Each sub-agent masters one domain (research, writing, validation). The orchestrator distributes sub-tasks and aggregates the results. This enables parallelism and cross-review between agents (one agent evaluates another's output before validation).

### Agentic RAG

An evolution of classic RAG where document retrieval becomes a dynamic action within the ReAct cycle. The agent decides how to query the knowledge base, evaluates how relevant the results are, rephrases if needed and supplements with external sources.

## Current challenges

### Autonomy vs control

The main challenge with AI agents is balancing autonomy (letting the agent decide) and control (keeping a human in the loop). The "human in the loop" pattern defines mandatory validation checkpoints in the execution cycle, especially for irreversible actions.

### Cost and latency

A multi-step agent consumes significantly more tokens than a classic chatbot exchange (10 to 50x). In a typical case, an agent mission can cost between €0.10 and €2 in tokens, where a chatbot exchange costs less than a cent. Every iteration of the ReAct cycle involves an LLM call. Optimizing the number of iterations and choosing the right model (small model for simple sub-tasks, large model for planning) are critical levers.


## Key Figures

- 40% of enterprise applications will integrate AI agents by end of 2026, up from less than 5% in 2025 *(Gartner — Press Release — August 2025)*

- 62% of organizations are experimenting with AI agents; 23% are scaling them *(McKinsey — The State of AI — November 2025)*

- 65% of the most mature organizations have defined human validation processes (human in the loop) for their AI agents *(McKinsey — The State of AI — November 2025)*



## Frequently Asked Questions

### What is the difference between an AI agent and a chatbot?

A chatbot is reactive and stateless: it answers a question, then forgets. An AI agent is proactive and stateful: it maintains context, plans its actions, uses external tools (APIs, databases, web search) and iterates in a loop until it reaches its goal. The chatbot waits for your instructions at every step; the agent decides its own next actions.

### How does an AI agent work?

An AI agent follows the ReAct cycle (Reasoning + Acting): it perceives the state of its environment, reasons about the best action to take via an LLM, executes that action (API call, web search, code execution), observes the result, then starts again. The cycle repeats until the goal is reached or an unrecoverable error occurs.

### What are the components of an AI agent?

An AI agent rests on four building blocks: memory (short and long term, to build on past actions), tools (callable functions such as APIs, SQL queries, web search), planning (autonomously breaking a goal down into sub-tasks) and action (actual execution in the real world). The LLM acts as the central brain coordinating these four components.



## Resources

- [Building effective agents](https://docs.anthropic.com/en/docs/build-with-claude/agent?utm_source=romaindelfosse&amp;utm_medium=glossaire&amp;utm_campaign=agent-ia) — Anthropic

- [ReAct: Synergizing Reasoning and Acting in Language Models](https://arxiv.org/abs/2210.03629?utm_source=romaindelfosse&amp;utm_medium=glossaire&amp;utm_campaign=agent-ia) — Yao et al.

- [LangGraph Documentation](https://langchain-ai.github.io/langgraph/?utm_source=romaindelfosse&amp;utm_medium=glossaire&amp;utm_campaign=agent-ia) — LangChain

