← Back home
LESSON 020AI Development10 min

What is an AI agent? A model that can decide steps and use tools toward a goal

An AI agent is more than one model response. Lesson 020 explains goals, loops, tool use, state and why agents need limits, checks and budgets.

Today’s analogyan assistant who can plan a task, use approved tools, inspect results and decide the next step

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:

  1. inspect the current situation,
  2. decide what action is needed,
  3. call an approved tool,
  4. read the tool result,
  5. update its state,
  6. 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:

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:

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.

Primary sources

Analogies build intuition; use the original sources for formal definitions and technical detail.

  1. OpenAI — Function calling ↗
  2. Google — Function calling with the Gemini API ↗
← Previous019How does AI API pricing work? Read input, output and cached tokens before estimating cost
Next →021What is an embedding? Turn meaning into coordinates so similar things can be found nearby
COMMUNITY

Comments

Questions, reactions and useful additions are welcome here.

0 / 1200