Tool use in AI agents is when an LLM-based agent can call external functions, APIs, or programs—often called a tool calling agent—to get information or take actions it cannot do reliably from text alone.
A plain language model is good at generating text, but it does not reliably know live facts, cannot directly query a database, and should not guess at actions like sending email or creating tickets. Tool use solves that by letting the model delegate specific steps to purpose-built systems.
You reach for tool use when the task needs one of these:
In practice, teams often start with a normal chat model and add tools only when the model needs to be more accurate, current, or operational.
The agent receives a user request.
It reasons about whether it can answer directly or whether it needs help from an external tool.
It selects a tool and emits a structured request.
In modern LLM systems, this is usually a function-style call with named arguments, not free-form text. The model does not “run code” itself; it asks the host application to do it.
The host application executes the tool.
The app calls the API, database, search engine, or internal service, then returns the result to the model.
The model uses the result to continue.
It may answer the user, ask a follow-up, or call another tool. This loop can repeat until the task is done.
A useful way to think about it: the LLM decides what to ask for, while your software decides whether and how to execute it.
User: “What meetings do I have tomorrow morning, and move the 9am one to 10am?”
Tool-calling agent flow:
calendar.list_events(start, end)calendar.update_event(event_id, new_start=10:00)