An AI agent is an LLM-based system that can take autonomous actions — calling tools, browsing the web, writing code, querying databases — to complete a multi-step task without manual intervention at each step. Unlike a chatbot that generates text, an agent executes work in the world.
Agents use a perceive-reason-act loop: read the environment, decide what to do, call a tool or write output, observe the result, and repeat. The risk is that errors compound across steps, making robust error handling, sandboxing, and human oversight critical for production deployments. Claude, GPT-4, and Gemini all support function calling as the foundation for agent behavior.