Course contents · How AI agents actually work
- 1What is an LLM?
- 2Prompts: brief it like a contractor
- 3Tools: how an AI does things
- 4Context: what's on the desk
- 5Memory: the filing cabinet
- 6What is an AI agent?
- 7Evals: how do you know it works?
- 8Who approves what an agent does?
- 9RAG: finding the right page
- 10Subagents: when an agent delegates
- 11MCP: one plug for every tool
- 12Not everything needs to be an agent
- 13The whole picture
Lesson 3 of 13
Tools: how an AI does things.
How a model that only writes text can check the weather, read your files or send an email, and why some tools need a human to say yes.
CTO and co-founder, LaunchLemonade8 minReading timeThink of the model as a very good adviser sitting in a room with no windows and no phone. It can't see outside and it can't act. But if you slide it a list of things it may ask for, it can write a note saying exactly which one it wants and why. Someone outside the room does the fetching.
A model can't look anything up on its own
An LLM has no way to get new information unless you provide it. It can't search the internet, check your CRM, read your emails or look up today's weather just because you asked. Our picture of it is still: text in, text out.
So how does an AI app check the weather? The model gets help from the application around it. That application has a name, the harness, which comes up properly in the lesson on agents.
How a tool call works
The application gives the model a description of each tool it may use: what the tool does and what inputs it needs. Say it describes a tool called get_weather that takes a location. You ask: "What's the weather in London?"
The model still can't check the weather. But it understands the question, sees that get_weather fits, and instead of answering, writes a structured request:
{ "name": "get_weather",
"arguments": { "location": "London" } }- You: "What's the weather in London?"
- The model sees your question and the list of tools
- The model writes a request: get_weather, London
- The application checks the request is valid
- The application calls a real weather service
- The result is added to what the model can see
- The model reads the result and replies to you
The important part: the model only asks. The application decides whether to do it, and does the actual work. That gap between asking and doing is where you put your safety checks.
Reading is not the same as doing
Now try something more interesting: "Email Alice and ask if she's free tomorrow." The mechanism is the same. The risk is very different.
- Read-only
- Checks the weather, searches the web, reads a document. Worst case, you get a wrong or wasted answer.
- Changes something
- Sends an email, updates a record, books a meeting. Worst case, something happens in the real world that you can't take back.
For the email, a sensible application checks which Alice you mean, confirms her address, shows you the draft and asks before it sends. A tool that changes something outside the conversation deserves more care than one that only reads.
What tools are for
Tools let a model search the internet, connect to other applications, search document libraries, read and send email, create calendar appointments, update a CRM, run code and much more.
Tools aren't the only way to give a model information. You can paste text, upload a document or attach an image yourself. What tools add is that the model can fetch what it needs when it needs it, and act on your behalf. It starts taking part in the world outside the chat.
Running example
The running job
Chasing last month's unpaid invoices, one lesson at a time.
Priya's brief from the last lesson describes the job. To actually do it, the invoice chaser needs three tools:
- Read invoices
- Lists the invoices that are unpaid and past their due date. Read-only, so it can run freely.
- Send email
- Sends a reminder to a client. This changes something outside the conversation, so Priya sees each draft and says yes before it goes.
- Update the tracker
- Adds a row to the spreadsheet saying who was chased and when. It changes a record, but it's easy to fix, so it can run and be checked afterwards.
Notice what isn't on the list. It doesn't need a tool to issue refunds, edit invoices or email anyone who isn't a client. Give a job the tools it needs and no more.
Practice
Try it yourself
About five minutes, in any AI chat app
Catch a tool call in the act
In an AI chat app that can search the web, ask: "What's the weather in London right now?" Watch for a sign that it searched, such as a "searching" message or links to sources.
If your app lets you, switch web search off and ask the same question.
Now ask it: "Send an email to my manager saying I'll be late."
What to look for
With search on, the app fetched live information and added it to the conversation. With search off, the model either says it can't know or gives a general answer. For the email, most chat apps can't send anything, and those that can should show you a draft and ask first. That's read-only versus changing something.
Common mistakes
Believing the model itself browsed or sent something.
The model only writes a request. The application decides and does the work, so that's where your checks belong.
Giving an assistant every tool available, just in case.
Give each job only the tools it needs. Fewer tools means fewer ways for things to go wrong, and an easier choice for the model.
Treating every tool the same.
Let read-only tools run. Ask a person to confirm anything that sends, pays or deletes.
Quick check
3 questions to see what stuck. Nothing is scored or saved.
1. When a model "uses" a tool, what does the model itself do?
2. Which tool most needs a person to confirm before it runs?
3. What happens to a tool's result?
Remember
The model asks, the application acts. Let tools that only read run freely, and put a human in front of tools that change things.
Sources and further reading
- 1.The LinkedIn post this lesson grew out of: Agentic tools
- 2.Anthropic: tool use with Claude
- 3.OpenAI: function calling
Optional
Try it in LaunchLemonade
Connect apps under Integrations, then switch them on for an assistant under What can it use?, alongside Internet search. Everything above works in any AI tool.
Finished this lesson?
0 of 13 done in this course. Progress stays in this browser, no account needed.