
Agentic AI – LLM with API Calls – Beginner Bootcamp
Welcome to our Beginner Bootcamp on Agentic AI! In this post, we’ll show you how to build a simple Weather Agent using OpenAI’s GPT-4 and real-time data from WeatherAPI.
New to Agentic AI?
Start with our Agentic AI: The Dawn of Proactive AI Assistants before diving into this hands-on guide.
Want to go deeper with multi-agent systems? Check out our advanced tutorial on Beginner Bootcamp: Create Agentic AI Apps with Python.
🛠️ GitHub Repository: 👉 View the Code on GitHub
( https://github.com/debabratapruseth/Agentic-AI-LLM-with-API-Calls )
What is the Weather Agent?
This project demonstrates how to build a smart conversational agent powered by OpenAI’s GPT-4, which fetches real-time weather data using WeatherAPI.
It’s perfect for:
- Python beginners
- AI/ML enthusiasts
- Educators teaching prompt engineering, APIs, or function calling
What You’ll Learn
- How to make function calls using OpenAI GPT-4
- How to use external APIs like WeatherAPI
- How to write robust Python functions with error handling
How It Works
User → GPT-4 → (Calls) get_weather(location) → WeatherAPI → Final Answer
- The user types a natural question (e.g., “Is it raining in New York?”)
- GPT-4 analyzes the input and decides if it should call the weather function
- If yes, it triggers the
get_weather()function - The Python function fetches weather data from WeatherAPI
- GPT-4 presents a well-formatted response using the real-time data
Educational Goals
This project is designed to help you:
- Understand LLM tool use and function-calling
- Learn how to fetch and process data from APIs
- Write modular, reusable Python code
- Build applications that combine AI reasoning + real-world data
Future Improvements
Here’s how you can take this project further:
- Add a Gradio or Streamlit UI for non-technical users
- Handle more edge cases and API failures gracefully
- Upgrade to a paid WeatherAPI plan to access forecast and history features
Ready to Build Your First Agent?
Open Google Colab (or any Python environment of your choice). Upload the notebook from the GitHub repo. Run the code and see the agent in action. Use any AI assistant (e.g., Gemini, Copilot, ChatGPT) for real-time debugging or customizations.
Discover more from Debabrata Pruseth
Subscribe to get the latest posts sent to your email.


