Ask a normal chat model, “What should I do before my trip?” It may produce a checklist.
Ask an agentic system, “Find three suitable flights, compare the rules and put the options into my planning document,” and the system may need several actions before it can finish.
That difference is the starting point for an AI agent.
A model response is not automatically an agent
A language model can generate text in one call.
An agent places a model inside a larger process where it can repeatedly:
- inspect the current situation,
- decide what action is needed,
- call an approved tool,
- read the tool result,
- update its state,
- continue or stop.
This is often called an agent loop.
Tools are what turn words into actions
A model itself does not magically have access to your calendar, database or code repository.
The application developer exposes specific tools, such as:
- search a database,
- read a file,
- run a calculator,
- call an API,
- create a calendar event,
- send a message,
- execute code in a sandbox.
The model can then choose among those tools according to the tool descriptions and the current context.
This is why tool selection does not always require retraining the model. Modern models can often receive tool schemas as part of the runtime context.
The agent needs state
After a tool runs, the agent has to remember what happened.
State can include the user’s goal, previous actions, tool outputs, files, errors and partial progress.
Without state, each step would behave like a brand-new conversation.
Planning can be explicit or lightweight
Some agents first create a multi-step plan. Others decide only the next action and re-evaluate after every result.
Neither approach is automatically better. Long plans can become wrong when the environment changes; purely reactive loops can waste calls.
Good systems often combine a high-level goal with short feedback cycles.
Agents can fail in more expensive ways than chatbots
A wrong chatbot answer is inconvenient. A wrong agent action can edit a file, spend money or contact someone.
That is why practical agents need:
- narrow tool permissions,
- confirmation for important actions,
- limits on the number of steps,
- cost and time budgets,
- logging,
- validation of tool outputs,
- safe handling of untrusted text.
The pricing ideas from Lesson 019 matter because one user task can trigger many model calls.
Agent does not mean fully autonomous
An agent can be useful even if a human approves every consequential step.
“Autonomy” is a design choice, not the definition of an agent.
A good system often automates low-risk work and asks before high-impact actions.
One thing to remember
An AI agent is a system that uses a model inside a loop to choose actions, use tools and update state while working toward a goal.
The next lessons explain two building blocks that appear in many AI applications: embeddings and vector databases.
Comments
Questions, reactions and useful additions are welcome here.
No comments yet. Be the 1F.