What is AI Agent?
A system that perceives its environment, decides what to do and takes actions toward a goal, from a simple thermostat rule to an LLM that plans and calls tools on its own.
Definition
An AI agent, also called an intelligent agent, is anything that perceives its environment through sensors and acts on that environment through actuators to achieve goals. This is the classic definition from Stuart Russell and Peter Norvig's textbook Artificial Intelligence: A Modern Approach, and it is deliberately broad: a thermostat, a chess program, a robot vacuum, a self-driving car and a chatbot that books meetings can all be described as agents. What makes an agent intelligent is how well its choice of actions serves its goals given what it can perceive and what it knows. Russell and Norvig describe agents with the PEAS framework, which lists the Performance measure, Environment, Actuators and Sensors. For a self-driving taxi, the performance measure is safe, fast, legal and comfortable trips; the environment is roads, traffic and pedestrians; actuators are steering, accelerator, brakes and signals; sensors are cameras, lidar, radar, GPS and speedometer. Environments are classified as fully or partially observable, deterministic or stochastic, static or dynamic, discrete or continuous, and single-agent or multi-agent, and harder environments need more capable agent designs. The classic types of AI agents, from simplest to most capable, are five. A simple reflex agent acts only on the current percept using condition-action rules, such as a thermostat that switches the heating on below 19 degrees. A model-based reflex agent keeps an internal model of the parts of the world it cannot currently see, such as a robot vacuum that remembers which rooms it has already cleaned. A goal-based agent considers future consequences and searches or plans for action sequences that reach a goal, such as a navigation app computing a route to a destination. A utility-based agent goes further and compares outcomes with a utility function, choosing the action with the best expected trade-off, such as an autonomous car balancing travel time, safety and passenger comfort, or a trading system weighing return against risk. A learning agent improves its own behaviour from experience: a critic gives feedback, a learning element updates the agent, and a problem generator suggests exploratory actions; spam filters, recommendation systems and game-playing programs such as AlphaGo are examples. Real systems often combine these ideas, and multi-agent systems involve several agents cooperating or competing. In current software engineering, AI agent usually means an LLM-based agent: a large language model placed in a loop with tools, memory and a goal. The model reads the task, decides on a step, calls a tool such as a web search, a code interpreter, a database query or an API, observes the result and repeats until it finishes or a limit stops it. Examples include coding agents that edit files and run tests (Claude Code, GitHub Copilot's agent mode, OpenAI Codex), research agents that search and synthesise sources, customer-support agents that look up orders and issue refunds within policy, and computer-use agents that operate a browser or desktop. In Russell and Norvig's terms, these are goal-based or utility-based agents whose model of the world and planning ability come from the LLM. AI agent vs agentic AI: an AI agent is the system itself, and the term covers every design from reflex rules to LLMs. Agentic AI describes the broader approach and quality of autonomy in modern LLM systems, where software plans, uses tools and works through multi-step tasks with limited human input. Every agentic AI system contains one or more AI agents, but many AI agents, such as a thermostat or a spam filter, are not what people mean by agentic AI.
When to Use AI Agent
Use the classic agent types when you design or explain any autonomous system: they help you decide how much memory, planning and learning a problem really needs. Many production problems are solved best by the simplest agent that works, such as rules or a reflex controller, because simpler agents are cheaper, faster and easier to verify. Reach for an LLM-based agent when a task has many possible paths, needs natural-language understanding, or involves deciding which tools to call in which order, such as triaging support tickets, researching a topic or making multi-file code changes. If the steps are known in advance, a fixed workflow that calls an LLM at specific points is usually more reliable and cheaper than a fully autonomous agent. When you build LLM agents, give them a small set of well-described tools, clear stopping conditions and budgets, least-privilege permissions, sandboxed execution for code, human approval for irreversible actions such as payments or deletions, and logging of every step so failures can be traced. Evaluate agents on realistic tasks rather than single prompts, because errors compound across steps.
AI Agent in Practice
- Simple reflex agent: a smart thermostat rule. Percept: current temperature. Rule: if temperature is below 19 C, turn heating on; if above 22 C, turn it off. It has no memory and no plan.
- Model-based reflex agent: a robot vacuum that builds a map of the home, remembers which areas are clean and where obstacles are, and uses that internal state when the current sensor reading alone is not enough.
- Goal-based agent: a GPS navigation app. The goal is the destination; the agent searches the road graph for a sequence of turns that reaches it, and replans when you miss a turn.
- Utility-based agent: a ride-hailing dispatch system that assigns drivers by scoring options on pickup time, trip length, driver idle time and fairness, then picks the assignment with the highest overall utility.
- Learning agent: an email spam filter that updates its model every time users mark messages as spam or not spam, so its accuracy improves over time without new hand-written rules.
- LLM coding agent: given the task 'fix the failing date-parsing test', the agent reads the test output, opens the relevant files, edits the parser, runs the test suite, sees one more failure, fixes it, and reports a summary of the change for human review.
- PEAS for a customer-support agent: Performance is resolved tickets, accuracy and customer satisfaction; Environment is the help desk, order database and policies; Actuators are replies, refunds and ticket updates; Sensors are incoming messages and API lookups.
Common Mistakes
- Thinking AI agents are new. The concept is decades old; LLMs are a new and powerful way to build the reasoning part of an agent.
- Calling every chatbot an agent. A chatbot that only answers questions does not act on an environment; it becomes an agent when it can take actions toward a goal, such as calling tools or changing state.
- Using a fully autonomous agent for a process with fixed steps, where a deterministic workflow would be cheaper, faster and easier to test.
- Giving an agent broad credentials and no approval step, so a misunderstanding or prompt injection in a web page or email can trigger harmful actions.
- Confusing the learning agent type with LLM agents. Most LLM agents do not learn from experience between sessions unless you build memory or fine-tuning into the system.
- Measuring an agent on one demo. Multi-step agents fail in compounding ways, so they need evaluation on many realistic tasks.

