An AI agent is a system built on a language model that can plan, use tools, and take a sequence of actions on its own to complete a task, rather than just responding to a single prompt.
What is an AI agent?
An AI agent is software that uses a language model as its reasoning engine to pursue a goal across multiple steps, rather than producing one response to one prompt. Given a task like "book me the cheapest flight next Friday," an agent can break that goal into steps, decide which tools it needs, take actions, observe the results, and adjust its plan, largely without a human directing each individual step.
How AI agents work
Most agents run in a loop: the model reasons about what to do next, calls a tool such as a web search, code execution environment, or an API, reads the result, and decides whether the goal is complete or another step is needed. This loop, sometimes paired with chain-of-thought reasoning, lets an agent handle tasks that a single prompt-and-response exchange can't.
What AI agents are used for
Agents are used for coding assistants that can write, run, and debug code across multiple files; research assistants that search the web and synthesize findings; and customer support systems that can look up account details and take action, not just answer questions. The common thread is a task too complex or too dependent on real-time information for a single response.
Risks and limits of AI agents
Because agents take real actions rather than just generating text, mistakes can have real consequences, from a wrong purchase to unintended file changes. Most production agent systems limit what actions an agent can take without human approval, and giving an agent broad, unsupervised access to sensitive systems remains one of the more actively debated safety questions in AI development.