In a previous post, we saw how RAG grounds the agent in your knowledge base. That's perfect for information that changes slowly: policies, descriptions, procedures. But some data changes minute to minute — for example, a product's stock quantity.
You really don't want that kind of data living in a static document. This is where the notion of a "tool" comes in.
What is a tool?
A tool is a function the agent is allowed to call to fetch live information or to perform an action. You describe it to the agent very simply, for example:
"You have a tool check_availability that takes a product name or an item code as input,
and returns the quantity in stock along with the restocking lead time."
From then on, the agent knows it can use it whenever a question requires up-to-date data.
An example, step by step
- The customer asks: "Is the Aria ergonomic chair available?"
- The agent understands the intent and determines it needs real-time data. It decides to call the
check_availabilitytool with the parameter "Aria chair." - Behind the scenes, the tool queries your product database (or your inventory system) and returns, for example: "7 units in stock, Montreal warehouse."
- The agent receives this data and phrases it in a natural answer: "Yes, the Aria ergonomic chair is in stock — there are 7 left at our Montreal warehouse. Would you like me to reserve one for you?"
Two essential principles
First, the agent never guesses availability: it fetches it at the source, exactly as an employee checking the inventory screen would. So the answer is always accurate at the moment it's given.
Second, you control what the tool exposes. The agent doesn't see your whole database: it only sees what the function agrees to return. So you can give it access to availability and price while keeping margins, supplier details, or any other sensitive data private.
More than just reading
Checking stock is only a start. The same mechanism lets you look up a schedule, calculate a price, or track a delivery. Each need becomes a tool, with its own rules, under your supervision.
And if the agent can read your data, it can also, within a secure framework, write to it — that is, perform a concrete action like placing an order. That's precisely the subject of another post.
At Netcoder, we connect your agents to your live systems. Let's talk about your data.
— Frédéric Brabant