When LLMs can DO things โ not just talk about them.
I KNOW how
Knowledge exists
"To book a flight, search airline websites..."
"Use a weather API to get forecasts..."
"Run SELECT * FROM sales..."
But CAN'T do it
No ability to act
The Gap: Knowledge without Action
The LLM THINKS, your code ACTS.
LLM outputs:
Your Code
โResult:
Agent
Loop
Step-by-step walkthrough
"What's the weather in Paris?"
"I need the weather tool"
get_weather("Paris")
{ "temp": "22ยฐC", "conditions": "Sunny" }
"I have the data, time to respond"
"It's 22ยฐC and sunny in Paris!"
Final Response
"I found a $340 round-trip on Air France, Hotel Le Marais for $120/night. March is about 12ยฐC with light rain, so pack a jacket!"
Real Tool Examples
Command:
Googled "flights to Paris March"
Output:
3 results: Air France $340, Delta $420...
Command:
Ran python analyze.py
Output:
Analysis complete: 847 rows processed
Command:
SELECT revenue FROM sales WHERE quarter='Q3'
Output:
Result: $4.2M (+18% YoY)
name:
get_weather
description:
"Get current weather for a city name. Returns temperature in Celsius and conditions."
name:
do_stuff
description:
"Does things"
The LLM reads your descriptions to decide WHEN to use each tool.
Bad descriptions = wrong tool choices = broken agents
Retry
Try the same tool again
Fallback
Use a different tool
Tell User
"Sorry, weather service is down"
Best choice here: Retry. Timeouts are often temporary, so trying again usually works.
What do you need?
Just a summary or answer
Simple API Call
Cheaper & faster
Real-time data or actions
Use an Agent
Tools + reasoning
Multiple steps with decisions
Definitely Agent
Loop + multi-tool
Don't over-engineer: pick the simplest approach that works
RAG Becomes a Tool in the Agent Loop
RAG is just another tool
The agent decides when to search documents, just like it decides when to call any other tool.
Simple Agent: Calculator
Your first agent, with one add tool
Math Tutor
Four tools: add, subtract, multiply, divide
Study Buddy
A calculator plus a knowledge lookup tool
Terminal Assistant
Runs commands, reads and writes real files
$ List all Python files in /src
Calling list_files(path="/src", pattern="*.py")...
Found 12 files: main.py, utils.py, api.py...
$ Show me the largest one
Calling file_info(path="/src/api.py")...
api.py (2.4KB, 89 lines) - REST API endpoints