See also: Machine learning terms
In artificial intelligence (AI), an agent is an entity that perceives its environment through sensors and acts upon that environment through actuators in pursuit of objectives. The concept of an agent is one of the most foundational ideas in AI, spanning classical AI planning, reinforcement learning, robotics, and the modern wave of large language model-powered autonomous systems. Stuart Russell and Peter Norvig define an agent simply as "anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators," making it the central abstraction around which AI research is organized.[1]
Since 2024, the term "agent" has taken on renewed significance in the AI industry. While the classical definition remains intact, a new generation of LLM-based AI agents has emerged that can use software tools, browse the web, write and execute code, and carry out multi-step tasks with minimal human supervision. This development has made "agentic AI" one of the defining trends of 2025 and 2026.[2]
Imagine you have a robot friend who can look around a room, think about what to do, and then do it. If the robot sees that the floor is dirty, it decides to vacuum. If it bumps into a chair, it turns and goes another way. That robot is an "agent" because it can sense things (see the dirty floor), think about them (decide to vacuum), and take action (start cleaning). AI agents work the same way, but they live inside computers. Some play video games, some answer questions, and some help drive cars. The smartest ones can even learn from their mistakes and get better over time, just like you get better at riding a bike the more you practice.
Formally, an agent is defined by an agent function that maps every possible percept sequence to an action:
f : P -> A*
where P* is the set of all possible percept sequences and A is the set of actions available to the agent. The agent function is an abstract mathematical description; the agent program is the concrete implementation that runs on a physical or virtual system (the agent architecture). A rational agent is one that selects actions expected to maximize its performance measure, given what it has perceived so far and any built-in knowledge it possesses.[1]
The PEAS framework (Performance measure, Environment, Actuators, Sensors) is commonly used to specify the task environment of an agent. For example, a self-driving car agent has a performance measure of safe and efficient travel, an environment of roads and traffic, actuators such as steering and braking, and sensors such as cameras and lidar.
The interaction between an agent and its environment follows a cyclical pattern that is especially well-formalized in reinforcement learning. At each discrete time step t, the agent:
This cycle repeats until a terminal condition is met or the process continues indefinitely. The agent's objective is to learn a policy that maximizes the expected cumulative reward over time. When the environment satisfies the Markov property (future states depend only on the current state and action, not on history), this framework is called a Markov Decision Process (MDP).[3]
| Component | Symbol | Description |
|---|---|---|
| State | s_t | Representation of the environment at time t |
| Action | a_t | Choice made by the agent |
| Reward | r_{t+1} | Scalar feedback signal from the environment |
| Policy | pi(s) | Mapping from states to actions |
| Value function | V(s) | Expected cumulative reward from state s |
| Transition function | T(s, a, s') | Probability of moving to state s' after taking action a in state s |
Russell and Norvig's textbook Artificial Intelligence: A Modern Approach classifies agents into five types based on their internal structure and level of sophistication. Each successive type builds on the capabilities of the previous one.[1]
Simple reflex agents select actions based solely on the current percept, ignoring the entire percept history. They operate using condition-action rules ("if the car ahead is braking, then apply brakes"). These agents work well in fully observable environments but fail when the environment is partially observable because they have no memory of past events. A household thermostat is a classic example: it turns on heating when the temperature drops below a threshold and turns it off when the threshold is exceeded.
Model-based reflex agents maintain an internal model of the world that tracks aspects of the environment that are not directly visible. This internal state is updated after each action and percept using two kinds of knowledge: how the world evolves independently of the agent, and how the agent's own actions affect the world. By maintaining this model, the agent can handle partially observable environments far more effectively than a simple reflex agent.
Goal-based agents extend model-based agents by incorporating explicit goal information that describes desirable states. Rather than just reacting, these agents use search and planning algorithms to identify sequences of actions that will achieve their goals. This makes them more flexible: when the environment or goals change, the agent can recompute its plan rather than requiring a complete rewrite of its condition-action rules. A robot vacuum that plans an efficient path through a room is an example of a goal-based agent.
Utility-based agents go further by employing a utility function that maps each state (or sequence of states) to a real number representing how desirable that state is. While goal-based agents have a binary notion of success and failure, utility-based agents can compare multiple outcomes on a continuous scale. This is especially important when there are conflicting goals, when goals can be achieved to different degrees, or when there is uncertainty about outcomes. A rational utility-based agent selects the action that maximizes expected utility, weighing probabilities and desirability of potential outcomes.
Learning agents can improve their performance over time through experience. They consist of four conceptual components: a learning element that makes improvements based on feedback, a performance element that selects actions, a critic that evaluates how well the agent is doing relative to a fixed performance standard, and a problem generator that suggests exploratory actions to discover new experiences. Nearly all sophisticated AI systems today are learning agents in some form.
| Agent Type | Internal State | Planning | Learning | Example |
|---|---|---|---|---|
| Simple reflex | None | No | No | Thermostat |
| Model-based reflex | World model | No | No | Spam filter with state |
| Goal-based | World model + goals | Yes | No | Route planner |
| Utility-based | World model + utility function | Yes | No | Financial trading agent |
| Learning | All of the above + learning element | Yes | Yes | Self-driving car, AlphaGo |
In reinforcement learning (RL), the agent is the central learning entity. Unlike supervised learning where correct answers are provided, an RL agent must discover which actions yield the highest reward through trial and error. The agent interacts with its environment over many episodes, gradually improving its policy.
RL agents can be broadly categorized as model-based or model-free. Model-based agents build an internal model of the environment's transition dynamics and use it for planning. Model-free agents, such as those using Q-learning or policy gradient methods, learn directly from experience without constructing an explicit environment model. Model-free approaches are often simpler to implement but may require more training data, while model-based methods can be more sample-efficient but rely on the accuracy of their learned model.[3]
Key RL algorithms for training agents include:
Game playing has been one of the most visible domains for AI agents, producing landmark achievements that demonstrated the power of different agent architectures.
Deep Blue (IBM, 1997) defeated chess world champion Garry Kasparov using brute-force search with hand-crafted evaluation functions. While not a learning agent, Deep Blue showcased the power of combining search algorithms with domain expertise.[4]
AlphaGo (DeepMind, 2015-2017) became the first computer program to defeat a professional human Go player without handicap. AlphaGo combined deep neural networks with Monte Carlo tree search and was trained through a combination of supervised learning on human games and reinforcement learning through self-play. Its successor, AlphaZero, learned to play Go, chess, and shogi entirely through self-play with no human game data, achieving superhuman performance in all three games.[5]
OpenAI Five (2019) defeated the world champions of Dota 2, a complex five-on-five multiplayer video game. The system used a team of five neural network agents trained with PPO over the equivalent of 45,000 years of gameplay. OpenAI Five won 99.4% of its public games, demonstrating that RL agents could master highly complex, partially observable, multi-agent environments.[6]
AlphaStar (DeepMind, 2019) reached Grandmaster level in StarCraft II, a real-time strategy game requiring long-horizon planning, imperfect information handling, and real-time decision-making.
| Agent | Game | Year | Key Technique | Achievement |
|---|---|---|---|---|
| Deep Blue | Chess | 1997 | Search + evaluation | Beat world champion Kasparov |
| AlphaGo | Go | 2016 | Neural nets + MCTS + RL | Beat 9-dan professional Lee Sedol |
| AlphaZero | Go, Chess, Shogi | 2017 | Pure self-play RL | Superhuman in all three games |
| OpenAI Five | Dota 2 | 2019 | Multi-agent PPO | Beat world champion team OG |
| AlphaStar | StarCraft II | 2019 | Multi-agent RL + imitation | Grandmaster level |
The most significant recent development in agent research is the emergence of agents built on top of large language models. These systems use an LLM as the core reasoning engine (the "brain") and augment it with the ability to use external tools, access memory, and take actions in digital environments.
An LLM-based agent typically operates in a loop:
This loop is closely related to the classical agent-environment cycle, but the "environment" is now the digital world of APIs, websites, and software tools, and the "policy" is the LLM's reasoning ability shaped by its training and prompt.
Chip Huyen identifies three categories of tools available to LLM agents:[7]
| Category | Purpose | Examples |
|---|---|---|
| Knowledge augmentation | Retrieve external information | Web search, document retrieval, API queries |
| Capability extension | Perform computations the LLM cannot | Calculators, code interpreters, translators |
| Write actions | Modify external state | Database writes, sending emails, making purchases |
ReAct (Reasoning + Acting): Introduced by Yao et al. in 2022, ReAct interleaves reasoning traces with actions in a Thought-Action-Observation loop. The agent first generates a verbal reasoning trace ("I need to find the population of France"), then formulates a tool call ("search: population of France 2025"), and finally incorporates the result into its context for the next reasoning step. ReAct has become the most widely adopted pattern for building LLM agents.[8]
Chain-of-Thought (CoT) Prompting: Encourages the agent to "think step by step" before acting, reducing errors and hallucinations. CoT is often combined with ReAct in practice.
Tree of Thoughts (ToT): Extends chain-of-thought by generating multiple alternative reasoning paths, evaluating them, and selecting the most promising ones. This introduces structured search into LLM reasoning.
Reflexion: Adds a self-critique mechanism where the agent reviews its own outputs and corrects mistakes before finalizing a response or action.
Plan-and-Execute: Separates planning from execution. The agent first generates a complete plan, then executes each step, and can revise the plan if intermediate results are unexpected.
A critical challenge for LLM agents is the accumulation of errors across steps. If an agent has 95% accuracy at each individual step, its reliability drops to approximately 60% over 10 steps and below 1% over 100 steps. This compound error problem means that even small improvements in per-step reliability can have outsized effects on end-to-end agent performance.[7]
Several open-source frameworks have emerged to simplify the development of LLM-based agents.
LangChain and LangGraph: LangChain, launched in 2022, is the most widely adopted framework for building LLM-powered applications, with over 75,000 GitHub stars and 47 million+ PyPI downloads. It provides modular components for chains, agents, memory, and tool integration. LangGraph extends LangChain by modeling agents as finite state machines where each node represents a reasoning or tool-use step, making it especially powerful for multi-turn, conditional workflows.
AutoGPT: Released in 2023, AutoGPT pioneered the concept of a fully autonomous LLM agent that can set its own sub-goals, browse the internet, and execute code with minimal human input. It spawned over 400 forks and inspired a wave of autonomous agent projects, though early versions suffered from reliability issues due to compound errors.
CrewAI: A framework for building multi-agent systems where each agent is assigned a specific role (e.g., "Researcher," "Writer," "Manager"). CrewAI handles delegation and task handoffs between agents and saw a 280% increase in adoption in 2025. Its intuitive abstractions allow developers to build working multi-agent systems in under 50 lines of code.
AutoGen (Microsoft): Treats agents as conversable entities that can be wired together in flexible interaction patterns, often using a star topology where a manager agent delegates subtasks to specialist agents.
| Framework | Primary Strength | Architecture Style | GitHub Stars (approx.) |
|---|---|---|---|
| LangChain/LangGraph | Modular pipelines, largest ecosystem | Chains and state machines | 75,000+ |
| AutoGPT | Fully autonomous operation | Autonomous loop | 170,000+ |
| CrewAI | Role-based multi-agent orchestration | Role delegation | 50,000+ |
| AutoGen | Flexible multi-agent conversations | Conversable agents | 40,000+ |
A multi-agent system (MAS) consists of multiple interacting agents that can cooperate, compete, or coexist within a shared environment. Multi-agent systems have been studied in AI for decades, but they gained renewed attention in 2024 and 2025 as LLM-based agents became capable enough to collaborate on complex tasks.
In a multi-agent system, agents may have different roles, capabilities, and objectives. They communicate through message passing, shared memory, or structured protocols. Key challenges include coordination (ensuring agents work together effectively), negotiation (resolving conflicts between agents with competing objectives), and emergent behavior (understanding what happens when many agents interact in ways that were not explicitly programmed).
Google's Agent2Agent (A2A) protocol, introduced in April 2025, addresses how agents communicate with each other, complementing Anthropic's Model Context Protocol (MCP), which standardizes how agents use tools. Together, these protocols represent an emerging infrastructure for interoperable multi-agent systems.
In December 2025, the Agentic AI Foundation (AAIF) was established under the Linux Foundation by founding members including Anthropic, OpenAI, Block, Amazon Web Services, Google, and Microsoft. The foundation consolidates key open-source projects including MCP, Block's Goose agent framework, and OpenAI's AGENTS.md convention into a neutral consortium to promote open standards for agentic AI.[2]
An autonomous agent operates with minimal or no human oversight for extended periods. Full autonomy exists on a spectrum: at one end, a human approves every action; at the other, the agent independently sets goals, plans, and acts without any human in the loop.
In practice, most deployed AI agents in 2025 and 2026 operate with a "human-in-the-loop" for high-stakes actions (such as financial transactions or sending emails) while handling routine steps autonomously. This reflects both the compound error problem and the recognition that current LLM-based agents, while impressive, still make mistakes that could have significant consequences.
Notable autonomous agent products include:
As agents become more capable and autonomous, safety concerns have become a major area of research and policy discussion. Key safety challenges include:
Alignment: Ensuring that an agent's objectives and behavior align with human intentions. An agent optimizing a poorly specified objective function may find unexpected and harmful shortcuts to achieve high reward (known as reward hacking).
Deceptive behavior: Research has found that harmful or deceptive behavior can spread across networks of LLM agents. Once one agent is compromised or begins behaving deceptively, it can influence others through communication, causing cascading failures.[9]
Information asymmetry: When agents operate with incomplete or inconsistent information, a single miscalculation can propagate through interconnected systems, triggering chains of poor decisions.
Controllability: Maintaining meaningful human oversight as agents become more autonomous. This includes the ability to interrupt, correct, or shut down an agent at any time.
Unintended side effects: Agents that modify their environment (writing to databases, sending messages, executing code) can cause irreversible harm if their actions are not properly constrained.
Existing safety techniques such as reinforcement learning from human feedback (RLHF) and constitutional AI were designed primarily for single-model systems and may be insufficient for the complexity of multi-agent deployments.[9]
Agents are deployed across a wide range of domains in modern AI:
| Domain | Agent Application | Example |
|---|---|---|
| Robotics | Physical agents that perceive and manipulate the real world | Warehouse robots, surgical robots |
| Gaming | Agents that play and master complex games | AlphaGo, OpenAI Five |
| Virtual assistants | Conversational agents that answer questions and perform tasks | Siri, Alexa, ChatGPT |
| Autonomous vehicles | Agents that navigate roads and traffic | Self-driving cars using sensor fusion and planning |
| Software development | Coding agents that write, debug, and review code | GitHub Copilot, Devin, Claude Code |
| Scientific research | Agents that read papers, formulate hypotheses, and run experiments | AI lab assistants, drug discovery agents |
| Customer service | Agents that handle support inquiries autonomously | Automated helpdesk systems |
| Finance | Agents that analyze markets and execute trades | Algorithmic trading systems |
The concept of an agent in AI has evolved significantly over the decades: