An AI agent is a system where a language model pursues a goal on its own. It chooses an action, runs it, then decides what to do next based on the result.
The difference from a chatbot is the loop. A chatbot answers and stops. An agent can search, call an API, read the result, notice it was wrong, and try something else.
Think of it like this. Think of the difference between asking a colleague a question and asking them to handle something. The question gets an answer. The task gets someone who looks things up, hits a snag, works around it, and comes back when it is done.
How it works
- A goal arrives. Something to accomplish, not a question to answer.
- The model picks a tool. From whatever it has been given: search, a database, an API, code execution.
- The tool runs and returns a result. This is real output from a real system, not a prediction.
- The model reads the result and decides again. Continue, change approach, or stop.
- The loop repeats until the goal is met, a limit is hit, or a human steps in.
Trade-offs
- Capable but unpredictable. Choosing its own steps is the point, and it means you cannot fully predict the path.
- Errors compound. A wrong step early sends everything after it in the wrong direction.
- Cost is variable. Every loop is another model call, and a stuck agent can spend a lot before anyone notices.
- Needs boundaries. Step limits, spending caps, and human approval for anything irreversible.
Common mistakes
- "Agents are fully autonomous." Nearly all useful ones run inside limits, with a human approving the consequential steps.
- "An agent is just a chatbot with tools." The loop is the difference. Acting on results and changing course is what makes it an agent.
- "More tools makes a better agent." A large toolbox makes choosing harder. A few well-described tools usually outperform many vague ones.
- "If it can loop, it should." Where the steps are known in advance, a fixed workflow is cheaper and more predictable.