An AI agent is a program in which a language model works toward a goal by deciding on steps, using tools and checking its own progress until the job is done. A plain chat model answers once. An agent might search the web, open a file, run code, read the result and try again, all from a single request.
The loop that makes something an agent
Under the hood an agent repeats a simple cycle. The LLM receives the goal plus a list of tools it may call, each with a name and a description. It replies either with a final answer or with a request to use a tool, such as "search_orders(customer='Lee')". The surrounding software runs that tool, feeds the output back, and the model decides the next move. The cycle continues until the model says it is finished or hits a limit on steps, time or cost.
Tools can be anything with an interface: an API, a browser, a code sandbox, or an MCP server, which is a standard way to plug tools into many agents at once.
An example: chasing an unpaid invoice
A bookkeeper asks an agent, "Find invoices more than 30 days overdue and draft a polite reminder for each." The agent queries the accounting software, filters the results, looks up each client's contact, writes the drafts and saves them for review. Coding tools work the same way: an agent edits files, runs the tests, reads the failures and fixes them.
Agent or chatbot?
A chatbot holds a conversation; an agent completes work. Many products blur the line by giving chat assistants a few tools. The useful question is whether the system can take actions in other software without you doing each step.
When a small business benefits
Agents help with repetitive multi-step chores: sorting inboxes, updating a CRM after calls, preparing reports, or building and fixing a website from a description. They are less suited to tasks where a single wrong action is costly, such as issuing refunds, unless a person approves each one.
Where agent setups go wrong
- Too much access. Give an agent only the accounts and permissions the task needs.
- No human checkpoint. Require approval before sending emails, spending money or deleting data.
- Vague goals. "Handle my inbox" invites surprises; "label and draft replies, send nothing" does not.
- Ignoring cost and loops. Set step and spending limits, because a stuck agent can retry many times.
Related terms
- LLM: the reasoning engine inside the loop.
- MCP server: a standard way to hand agents tools.
- Chatbot: conversation without the action loop.
- Vibe coding: building software by steering a coding agent.