Skip to content

Lesson 1 of 6

What Is a Claude AI Agent?

20 minUpdated 13 Nov 2026Part of Build Your First Claude AI Agent
On this page
  1. What you will learn
  2. An agent in everyday language
  3. The four parts of the agent you will build
  4. Chat versus agent, side by side
  5. Follow one question through the agent
  6. The project you will build
  7. What an agent is not
  8. Common errors and fixes
  9. Validation checklist
  10. Hands-on exercise
  11. Knowledge check
  12. References

You have probably asked an AI assistant a question and received a helpful answer. That is a chat. An agent is something a little different: it is a program that can ask for help from the outside world, such as looking up a record, and then use what comes back to answer you. The difference is small to describe and large in what it allows.

This first lesson has no code to run. Its job is to give you a clear mental picture before you touch anything, so that the later lessons feel like assembling parts you already understand. By the end you will be able to explain what a Claude agent is to a friend, name its four parts, and read a short trace of an agent answering a question about a fictional order.

Everything in this course is built around one small project: an order-status helper for a made-up outdoor-gear shop called Brightwater Outfitters. It uses sample data only. PromptFable is an independent education site and is not affiliated with or endorsed by Anthropic; Claude is a product name that belongs to its owner.

What you will learn

  • Explain an AI agent in everyday language.
  • Describe the difference between a normal Claude chat and an agent that can use a tool.
  • Name the four parts of the course agent: the model, the instructions, the tools and the application.
  • Explain why the application, not the model, runs any function.

Before you start

  • No programming is required for this lesson.
  • Curiosity about how an assistant can look things up rather than guess.
  • For the rest of the course you will need basic familiarity with Python, which the next lessons introduce step by step.

An agent in everyday language

Imagine you phone a shop and ask, 'Where is my order?' A well-trained person on the phone does not guess. They say, 'Give me a moment,' open the order system, look up your order, read what it says and then tell you. They used a tool (the order system) and then used its result to answer.

A normal chat with Claude is like asking that person a question when they have no computer. They can explain, advise and write, but they can only draw on what they already know. If you ask about order BW-1042, they have nothing to look at, so the honest answer is 'I cannot see that.' A dishonest or careless assistant would invent something. Avoiding that invention is one of the main reasons to build an agent.

An AI agent, in this course, is a program in which a language model can ask for a tool to be used, receives the result, and then continues towards an answer. The model decides *whether* a tool is needed and *which arguments* to give it. Your program decides whether to run it, and runs it.

The four parts of the agent you will build

Every agent in this course has the same four parts. Learning to point at each one is the most useful thing you can take from this lesson, because bugs and design questions almost always belong to exactly one of them.

Model
The Claude model that reads text and writes text. It has general knowledge and language skill but no access to your data and no ability to run anything. You choose it by its model ID, a short string such as the one you will set in lesson 3.
Instructions
Plain-language text you supply, called the system prompt, that tells the model its job, its limits and how to format replies. Think of it as the briefing you give a new colleague before their first shift.
Tool
A function in your own code, described to the model by a name, a purpose and the arguments it takes. In this course there is exactly one: get_order_status, which only reads from a small sample data file.
Application
Your Python program. It talks to the API, passes the conversation back and forth, receives the model's tool requests, runs the function, and shows the final answer. It is the part that is in charge.
How the four parts relate
  1. Person

    Asks a question

  2. Application

    Your Python program

  3. Model

    Claude, guided by your instructions

  4. Tool

    Your function, run by the application

The model never touches your data directly. Everything passes through your application.

Chat versus agent, side by side

QuestionNormal chatAgent with one tool
Where does the answer come from?The model's general knowledge and the text you typed.The model's language skill plus data returned by your function.
Can it look up order BW-1042?No. It can only say it cannot see it, or guess.Yes, by asking your application to run get_order_status.
Who runs code?Nobody. Only text is exchanged.Your application runs the function. The model never does.
Who sets the limits?Mostly the instructions you type each time.Your instructions plus the code around the tool, such as validation.
Main riskConfident but invented answers.A tool that is too powerful, or arguments that are not checked.
A comparison of the two set-ups.

Notice the last row. Adding a tool solves one problem (invention) and creates another (you now have code that the model can ask you to run). That is why the tool in this course is read-only, why its arguments are checked before it runs, and why lesson 6 spends time on confirmation before any external action.

Follow one question through the agent

The steps below are a paper walkthrough of a single question. You do not run anything yet. The traces are illustrative: they show the shape of what happens, and the exact wording from a real model will differ.

  1. Step 1: A person asks a question

    The application receives the text typed by the person and adds it to the conversation, which is a list of messages.

    Text
    user: Where is order BW-1042?

    The first message in the conversation.

    What you should see: The conversation contains one user message.

  2. Step 2: The application sends the question, the instructions and the tool description to Claude

    The tool description is only a description. Claude now knows a tool called get_order_status exists and what argument it needs, but it cannot run it.

    What you should see: Claude has everything it needs to decide whether a lookup is required.

  3. Step 3: Claude replies with a tool request instead of an answer

    It has noticed an order ID and no order data, so it asks for the tool. This is a structured request, not prose.

    Text
    claude: (tool request) get_order_status with order_id = "BW-1042"

    What you should see: The reply is marked as a tool request, not as a final answer.

  4. Step 4: The application checks and runs the function

    Your code checks that the ID looks valid, looks it up in the sample data and gets a small record back. Nothing is changed anywhere.

    Text
    application: get_order_status("BW-1042") -> {"status": "shipped", "carrier": "Fictional Freight"}

    What you should see: The application now holds a result to send back.

  5. Step 5: The result goes back to Claude, which writes the answer

    Claude receives the record as the result of its request and turns it into a sentence a person can read.

    Text
    claude: Order BW-1042 has shipped with Fictional Freight.

    What you should see: The person sees a grounded answer based on the sample data.

What the person seesIllustrative — your output will differ
You: Where is order BW-1042?
Helper: Order BW-1042 has shipped with Fictional Freight.

The project you will build

Over the next five lessons you will build a command-line order-status helper in a folder called claude-order-helper. It answers questions about orders for Brightwater Outfitters using a small Python file of invented orders. There are no real customers, no real people and no personal data anywhere in it.

  • Lesson 2 prepares your account, API access and a safe place for your key.
  • Lesson 3 makes your first request and prints Claude's reply.
  • Lesson 4 gives the assistant a job, with limits and a reply format.
  • Lesson 5 adds the single read-only tool and the loop around it.
  • Lesson 6 tests, hardens and publishes the project without exposing your key.

What an agent is not

  • It is not a person. It follows instructions and patterns, and it can be wrong while sounding certain.
  • It is not safe by default. Safety comes from the code and process you build around it.
  • It is not autonomous in this course. It can request one read-only lookup per question, and your program decides whether to honour the request.
  • It is not a way to avoid checking its answers. You will always compare what it says with the data the tool returned.

Common errors and how to fix them

You expect Claude to read your files or database on its own.

Why it happens: A model only sees the text sent to it in a request. It has no access to your computer or data.

Fix: Give it access through a tool that your application runs, and send the result back as text.

You think the model runs the function when it asks for a tool.

Why it happens: The word 'call' suggests execution. A tool call is a request in a structured message.

Fix: Remember that your application receives the request and decides whether to run the function. If your code does not run it, nothing happens.

You assume the Claude chat app subscription covers building agents.

Why it happens: The chat app and the developer platform look related but are separate products.

Fix: Read lesson 2 before spending anything. API usage is set up and billed separately from a chat subscription.

Validation checklist

Tick each item once you have confirmed it.

Hands-on exercise

Sketch an agent for a different shop

On paper or in a text file, describe a second tiny agent for a fictional bakery. Name the four parts: which model, what instructions, one read-only tool and what your application does. Then write the trace of one question in the same five-step form used in this lesson.

You will need

  • A fictional bakery and a sample list of three loaves with a stock count each.

Acceptance criteria

Your work is done when every one of these is true.

Hints (2)
  • A good tool name describes one action, such as get_loaf_stock.
  • Think about what the assistant should say if the loaf is not in the list.
Show a model answer

A strong answer has a one-argument tool such as get_loaf_stock(loaf_name), instructions that say the assistant must only report stock the tool returned, and a trace in which the application looks up the loaf, returns a small record and lets the model phrase the reply. It also covers the missing case: if the loaf is not found, the tool returns a clear not-found result and the assistant says so rather than guessing.

Knowledge check

Choose an answer, then check it. Nothing is recorded — this is for you.

  1. 1.What is the main thing an agent can do that a plain chat cannot?
    Show the answer and explanation

    Answer: A. An agent can request a tool and use what comes back. The third option is tempting, but the model never runs code itself: your application does.

  2. 2.Which part of the system actually executes the get_order_status function?
    Show the answer and explanation

    Answer: B. Your application runs the function after receiving the model's request. The model only produces the request. Choosing the model is tempting because it 'asks', but asking and doing are separate steps.

  3. 3.Why is the course tool read-only?
    Show the answer and explanation

    Answer: C. A read-only tool cannot alter or delete anything, which keeps mistakes cheap while you learn. Cost is not the reason, and Claude can request other kinds of tools, which is why changing tools need extra safeguards.

Written by
PromptFable Editorial
Last updated 13 Nov 2026
Review
Reviewed by Waseem Nadir, Technical Reviewer
Last reviewed 27 Nov 2026

References

Primary sources for the technical details in this lesson. Vendor platforms change — check the official page if anything here looks different from what you see.

PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.