AI agent
An AI agent is a system where a language model decides and takes actions through tools in a loop to accomplish a goal, rather than producing a single response.
An AI agent wraps a model in a loop: it reasons about a goal, calls a tool, observes the result, and decides the next step — repeating until the task is done. The model drives its own trajectory rather than answering once.
Agents are the right tool when a task is multi-step and hard to fully specify in advance, the outcome justifies the cost, and errors can be caught and recovered. For simple, well-specified tasks, a single call or a fixed workflow is cheaper and more reliable.
Production agents need guardrails: scoped tool permissions, human-in-the-loop checkpoints for risky actions, observability, and evals — otherwise they’re hard to trust and debug.