An agent wraps an LLM in a loop where it can decide to call tools (search, code execution, APIs, file edits), observe results, and continue until a goal is met. This turns a text generator into something that does things — books a trip, fixes a bug, researches a topic. The capability is powerful but raises reliability and safety stakes: an agent acts on the world, so errors have consequences.