An AI agent is a language model given a goal and a set of tools, left to decide its own next step. Instead of answering once, it works in a loop: choose an action, call a tool, read the result, decide what to do next, and stop when the goal is met.
Also called: agentic AI, autonomous agent · Reviewed
The model is told what tools exist and what each one does. It replies not with prose but with a request to call one — search this, read that file, run this query. Your code executes the call and hands back the result, which becomes part of the context for the next turn. Repeat until the model says it is finished or a limit you set is reached.
Everything else is engineering around that loop: what tools to expose, how much history to keep, when to ask a human, and when to stop.
It changes what can be automated. A single model call can answer a question about a document you supply; an agent can find the document. Tasks with an unknown number of steps — investigate this bug, reconcile these records, research these five suppliers — cannot be expressed as one call, and that is the category agents open up.
Handing an agent more autonomy than the task deserves. Errors compound across a loop: a wrong turn on step two is the ground truth for step three. The systems that work in production are narrow, have few well-described tools, and keep a person in front of anything irreversible — sending the email, moving the money, deleting the records.
Cost and stopping conditions are the other reliable surprise. Every iteration re-sends a growing context, so a loop that runs forty times instead of four costs far more than ten times as much. Set iteration caps and budget limits before the first run, not after the first invoice.