AI Agent
An AI agent is a system, typically built around a large language model, that can perceive its environment or task, make decisions, and take autonomous actions — such as calling external tools, executing code, or interacting with APIs — in…
Definition
An AI agent is a system, typically built around a large language model, that can perceive its environment or task, make decisions, and take autonomous actions — such as calling external tools, executing code, or interacting with APIs — in pursuit of a goal, often operating through multiple steps without requiring a human to specify each individual action.
Overview
Traditional LLM usage is single-turn or conversational: a user provides a prompt and the model returns a text response. An AI agent extends this by giving the model the ability to take actions in the world and observe the results, then use those observations to decide its next step, repeating this loop until a goal is achieved or a stopping condition is met. An agent architecture typically includes several components: the LLM serves as the reasoning engine that decides what to do next; a set of tools or functions (web search, code execution, database queries, API calls) that the agent can invoke; memory to track context across multiple steps or sessions; and often a planning mechanism that breaks a complex goal into smaller subtasks. A common pattern is the ReAct framework (Reason and Act), where the model alternates between reasoning about the current state and choosing an action, observing the result, and reasoning again. Agents differ from simple prompt-response systems in that they can handle multi-step tasks requiring dynamic decision-making — for example, researching a topic by issuing several search queries, evaluating results, and synthesizing an answer, rather than answering purely from parametric knowledge. This makes agents powerful for tasks like coding (where an agent can write code, run tests, read error output, and iterate), research, and workflow automation. However, agents introduce new risks: compounding errors across multiple steps, unpredictable or unsafe tool use, higher cost and latency from multiple LLM calls per task, and the challenge of reliably evaluating whether an agent achieved its goal correctly. Robust agent systems typically include guardrails, human-in-the-loop checkpoints for high-stakes actions, and careful scoping of what tools and permissions the agent is granted.
Key Concepts
- Combines an LLM's reasoning with the ability to take actions via tools or APIs
- Operates in a loop: reason, act, observe results, and reason again
- Can break down complex goals into smaller, sequential subtasks (planning)
- Maintains memory or state across multiple steps of a task
- Enables multi-step, dynamic workflows beyond single-turn prompt-response
- Common pattern: ReAct (Reason and Act) framework alternating thought and action
- Introduces risks of compounding errors and unsafe or unintended tool use
- Requires guardrails, scoped permissions, and often human oversight for high-stakes actions
Use Cases
Frequently Asked Questions
From the Blog
8 Metrics for Evaluating RAG and Agent Systems
No single metric tells you whether a RAG or agent system works, because retrieval, grounding, task completion and cost fail independently. These eight metrics cover the distinct failure modes, what each one catches that the others miss, and how to compute each on your own data.
Read More AI & Technology9 Agent Failure Modes to Test Before You Launch
Agents fail in a small number of recognisable ways, and nearly all of them can be provoked deliberately before a user finds them. This article names nine failure modes, from invented tool calls to stale memory and irreversible actions, and gives a concrete test for each that belongs in a pre-launch suite.
Read More AI & TechnologyAgent Cost Control: Step Limits, Budgets and Early Exits
Agent cost is controlled by three mechanisms: a hard step limit, a per-run token budget checked before each call, and an early exit when the answer is already good enough. This article shows how to implement all three, plus model routing per step type.
Read More AI & TechnologyAgent Error Recovery: Retries, Fallbacks and Dead Ends
An agent recovers from a tool failure only if the failure reaches it as a readable observation rather than an exception. This covers turning errors into structured observations, deciding what the runtime retries versus what the model retries, and setting the give-up rules that stop a run looping forever.
Read More