An AI agent is a system in which a language model does not fulfil a one-off query but independently pursues a given goal in a repeating loop of planning, acting and evaluating. It differs from an ordinary prompt in its autonomy over the procedure: the agent divides the task into steps itself, chooses and uses tools through function calling, reads the result, judges whether it has moved closer to the goal, and decides on the next step. Typical components are a planner, a set of tools, memory exceeding the context window, and a critic assessing intermediate results. The behavioural template is the ReAct scheme, interleaving explicit reasoning with actions. A characteristic risk is the accumulation of errors: if one step is ninety-five per cent reliable, after twenty steps the success rate of the whole chain falls to a third, and the agent may moreover keep reinforcing a mistaken assumption. Security questions include the scope of granted permissions, the cost of uncontrolled loops, and especially indirect prompt injection through data the agent reads along the way. That is why practice increasingly favours a limited set of tools and an approval step for irreversible operations.
The difference between an assistant and an agent is like the difference between a researcher and an estate manager. You give the researcher a question and he brings back an answer. You tell the manager “get the garden ready for winter” and he decides for himself to check the weather first, then harvest, then cover the roses, checking as he goes whether things are going to plan. An enormous saving, but also new risks. If he gets it wrong at the outset about which bed holds the roses, he will dutifully repeat that mistake all day. And if you hand him the keys to the whole estate, you had better know at which doors you want to be called in on the decision.