A beginner-friendly Agentic AI project demonstrating Tool Calling using the Schema → Function → Executor pattern.
Large Language Models (LLMs) cannot directly interact with APIs, databases, or external services.
This project demonstrates how an AI Agent can use tools through a simple three-step architecture:
User Question
│
▼
Schema (What the LLM Sees)
│
▼
Function (Python Implementation)
│
▼
Executor (Runs the Tool)
│
▼
Tool Response
│
▼
Final Answer
- ✅ Weather Tool Schema
- ✅ Simulated Weather Database
- ✅ OpenWeatherMap API Integration
- ✅ Tool Registry
- ✅ Function Executor
- ✅ LLM Tool Call Simulation
- ✅ JSON Formatted Responses
- ✅ Beginner Friendly Code
- ✅ Easy to Extend with More Tools
weather-agent-tool/
│
├── main.py
├── weather_schema.py
├── weather_tool.py
├── executor.py
├── requirements.txt
├── README.md
└── .gitignore
- Python
- Requests
- JSON
- OpenWeatherMap API
- Agentic AI Concepts
- Function Calling
- Tool Execution Pattern
The schema describes the tool.
It tells the language model:
- When to use the tool
- What arguments to provide
Example:
weather_tool_schema = {
"name": "get_current_weather",
...
}The actual Python code.
Example:
get_current_weather(
city="Mumbai",
unit="celsius"
)Acts as a bridge between the model's decision and Python execution.
Example:
execute_tool_call(
tool_name,
tool_args,
tool_registry
)Clone the repository
git clone https://github.com/Ronit049/weather-agent-tool.git
cd weather-agent-toolInstall dependencies
pip install -r requirements.txtRun the project
python main.pySCHEMA (what LLM sees):
Name : get_current_weather
Description : Get the current weather for a given city...
Parameters : ['city', 'unit']
FUNCTION
Direct call:
{
"city": "Jaipur",
"temperature": 41,
"unit": "celsius",
"condition": "Sunny",
"humidity": 22
}
EXECUTOR
LLM decided:
call get_current_weather(city='Mumbai')
Executor ran it →
{
"city": "Mumbai",
"temperature": 31,
"unit": "celsius",
"condition": "Humid and Cloudy",
"humidity": 85
}
- Gemini Function Calling
- Forecast Support
- Command Line Interface
- Multi Tool Agent
- Calculator Tool
- Currency Converter Tool
- Web Search Tool
- Memory Support
"The people who are crazy enough to think they can change the world are the ones who do."
— Steve Jobs
Computer Science Student (CSE'28)
Arya College of Engineering, Jaipur
GitHub: https://github.com/Ronit049
LinkedIn: https://www.linkedin.com/in/ronit-raj7497
Email: ronitraj049@gmail.com
If you found this project useful, please consider giving it a ⭐ on GitHub.
⭐ Star this repository
🍴 Fork it
🛠 Contribute
📢 Share it with others
This project is created for educational and learning purposes.
Feel free to use, modify, and improve it.