Tools and Actions
Why tools matter
Beyond text generation
An agent becomes much more capable when it can use tools. Tools can calculate, search, browse, query databases, send messages, run code, or trigger workflows. Tools let the agent interact with the world instead of only talking about it.
Common tool types
Tools add power and risk
The more powerful the tool, the more important it is to control permissions and verify outputs.
Typical tool-use flow
-
1
Step 1: Decide that a tool is needed.
-
2
Step 2: Format the request correctly.
-
3
Step 3: Read the tool result.
-
4
Step 4: Use the result to choose the next action.
Why do agents use tools?
Tools give the agent capabilities beyond text generation.
Correct answer: To extend what the agent can do in the real world
Name one benefit of using a calculator tool inside an agent.
Calculator tools reduce math errors and improve precision.
Correct answer: It can perform accurate arithmetic.
Tool selection
Good agents choose the right tool for the job. A search tool is useful for finding facts, while a calculator is better for exact numeric work. Tool choice is part of the agent's decision-making.
TOOLS & ACTIONS
How agents extend beyond text to interact with the world
Web search, vector retrieval, DB queries
Python interpreter, shell, sandboxed runners
REST APIs, webhooks, external services
Read, write, and transform documents
Spawning specialized child agents
Browser control, click, fill forms
Anatomy of a Tool Call
{
"tool": "search_web",
"parameters": {
"query": "best AI agent frameworks 2026",
"num_results": 5
}
}
// System executes, returns results to LLM context