What an agent is made of
- A model, usually a large language model, that reads the goal and the history so far and decides the next step.
- Instructions that set the job, the tone and the limits.
- Tools: functions the agent may call, such as look up an order or draft a reply, each with its own permissions. The Model Context Protocol is one open way to connect them.
- State: what has happened in this task, and sometimes notes kept between tasks.
- A loop with stop conditions: decide, act, check the result and repeat, until the goal is met, a limit is reached or a person must step in.
Agent, chatbot or workflow?
| Approach | Who decides the steps | Fits when |
|---|---|---|
| Chatbot or assistant | A person, after reading the answer | People need answers or drafts |
| Workflow automation | The designer, in advance | The steps are known and stable |
| AI agent | The model, at run time, within limits | The path varies from case to case |
Many good systems combine them: a fixed workflow with one agent step where judgement is needed, such as working out what a free-text email asks for. Our article on agents versus workflow automation compares the two.
An example
Imagine a distributor whose customers email to move delivery dates. An agent reads each email, finds the order, checks the warehouse calendar and proposes a new slot. If the slot is free and the order has not shipped, it updates the booking and replies. If the goods are already on a truck, or the customer wants a refund, it passes the case to a coordinator. This example is hypothetical.
Where agents go wrong
- Too much access. An agent that can write everywhere can do real damage when it misreads a case or meets prompt injection. Give each tool the narrowest permission that works.
- Errors that compound. A slip in step two becomes a wrong action in step five. Log every step to trace it.
- Runaway loops and cost. Without limits on steps and spending, an agent can retry a failing call again and again.
- No approval point. Payments, deletions and messages that commit the business should wait for a person's approval, enforced by the system, not requested in the prompt.
Related terms
Agents are measured with LLM evaluation and stress-tested through AI red teaming. See also AI agent development and the guide to deploying AI agents safely.