AI agent definition
An AI agent is software that uses a language model to work toward a goal on its own, step by step. It decides what to do next, calls tools such as search, APIs or a browser, checks the result and keeps going until the task is done or it needs a human.
"Agent" now gets attached to almost any AI feature, so a working definition helps. An AI agent is handed a goal instead of a single question, and it chooses its own steps to get there. Technically it is usually an ordinary large language model running in a loop, with access to tools it can call.
How do AI agents work?
The model reads the goal and a list of tools it may use. It picks one, the tool runs, the result goes back into the model's context, and the model decides whether to call another tool or stop. A coding agent might open a file, edit it, run the tests, see one fail and edit the file again, with nobody prompting it between those steps.
Tools are increasingly connected through the Model Context Protocol (MCP), an open standard Anthropic introduced in November 2024. An MCP server exposes a system such as a CMS, a database or a design file in a format any compatible agent can use.
AI agent vs. chatbot vs. workflow
A chatbot answers and waits for your next message. A scripted workflow runs fixed steps in a fixed order, even when one of the steps calls a model. An agent decides the steps itself. That flexibility is what makes agents useful for messy tasks, and it is also why they sometimes take a route nobody planned for.
AI agents in web development
Coding agents such as Claude Code and OpenAI Codex handle routine implementation work on site builds: scaffolding a page, wiring up a form, fixing a type error that touches a dozen files. They do noticeably better in a codebase with written conventions and a fast way to check their output, like a type checker or an end-to-end test suite.
Give an agent the narrowest permissions that still let it finish the job. Read access to a CMS is low risk. Permission to publish to the live site is a decision worth making on purpose.
Related terms
- Agentic workflowAn agentic workflow is a multi-step process where a language model handles some of the steps, such as drafting, classifying, calling tools or checking output. The order of steps is fixed in code. That separates it from an AI agent, which plans its own steps.
- Agentic codingAgentic coding is software development where an AI agent does the hands-on work. It reads the codebase, edits files, runs commands and tests, and keeps iterating until the task is done. The developer sets the goal, reviews the result and decides what ships.
- Language modelA language model is an AI model trained to predict the next word, or part of a word, in a piece of text. Large language models (LLMs) such as GPT, Claude and Gemini use that ability to answer questions, write, translate, summarize and generate code.
- Generative AIGenerative AI is artificial intelligence that creates new content, such as text, images, audio or code, from a prompt. It learns patterns from large amounts of training data and produces output that resembles that data, instead of only sorting or scoring what already exists.