An agent usually runs a loop: the model reads the goal and the current state, decides on an action, calls a tool, observes the result and repeats until the task is done or it needs help. Tools can include search, a code interpreter, a browser, email or company APIs.
Agents are powerful but harder to make reliable than single answers, because errors compound over many steps. Good designs limit permissions, ask for confirmation before irreversible actions and log every step. See what AI agents are.