AI agent
A model that decides its next step itself, calls tools and repeats until the task is done.
An AI agent is a language model running in a loop with tools. Instead of answering once, it plans, calls a tool (search, code, an API), reads the result and decides what to do next, until the task is done or a limit stops it. The difference from a workflow is who controls the steps: in a workflow your code does, in an agent the model does.
The loop itself is short; see agentic loop. What makes an agent useful or dangerous is around it: which tools it may call, what context it gets, the limits on turns and spend, and where a person must approve an action. The price of flexibility is predictability. The same request can take a few steps one day and many more the next, cost varies per task, and every page or email the agent reads can carry prompt injection.
Vendors call many things agents, from a chatbot with one API call to a system that runs for hours. Ask what the model decides on its own and what it may change without approval; agent autonomy levels give you the vocabulary. If the steps are known in advance, an agentic workflow is cheaper and easier to test. When one agent’s context gets too crowded, the next step is subagents or a multi-agent system.
Related terms
- Agentic loop: The cycle of model call, tool call and result that an agent repeats until it stops.
- Tool use (function calling): The model returns a structured request to run a function you defined; your code runs it.
- Human in the loop: A person approves, edits or rejects the agent’s action before it takes effect.
- Agentic workflow (workflow vs agent): A process where your code fixes the steps and a model does some of them, as opposed to an agent that decides its own steps.
- Agent autonomy levels: How much an AI agent may do without a person: suggest only, act with approval, act and report, or act alone within limits.
- Subagent: A separate agent run with its own fresh context, started by a main agent for one subtask.
- Multi-agent system (multi-agent orchestration): Several AI agents with separate roles and contexts working on one task, usually coordinated by a lead agent or a fixed workflow.
- Agent harness (harness engineering): Everything around the model that makes it an agent: the loop, tools, permissions, instructions, saved state, checks and session handoff.
