Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌦️ Weather AI Agent

Building AI agents from scratch - No LangChain, no frameworks, just pure Python logic.

Python License

🎯 What is this?

An autonomous AI agent that understands natural language and calls tools intelligently to fetch real-time weather data. Built to understand how AI frameworks like LangChain actually work under the hood.

Why I built this:

I was tired of using AI frameworks as black boxes. So I decided to build an agent from first principles to understand:

  • How tool calling actually works
  • How agents make decisions
  • How to parse LLM outputs reliably
  • How to build autonomous loops

This is my learning journey in building production-ready AI systems.


✨ Features

Autonomous tool calling - Agent decides when to fetch weather
Natural language understanding - Ask in any way you want
Real-time weather data - Uses Open-Meteo API (no API key needed)
Web UI - Clean Gradio interface
Zero frameworks - Pure Python, no LangChain/LlamaIndex


🚀 Demo

Demo

Try it live: Hugging Face Space


🏗️ Architecture

User Query → LLM Decision → Tool Detection → Execute Tool → Format Response

How it works:

  1. User asks: "What's the weather in Mumbai?"
  2. LLM responds: TOOL_CALLING ...
  3. Agent parses and executes tool
  4. LLM formats result naturally

No magic. Just clean logic.


📦 Installation

# Clone repo
git clone https://github.com/Chebaleomkar/weather-ai-agent.git
cd weather-ai-agent

# Install dependencies
pip install -r requirements.txt

# Run web UI
python app.py

Create api keys at here : https://console.groq.com/keys

Past the keys in .env file


💻 Usage

Basic Usage:

from main import AutonomousAgent, LLM

agent = AutonomousAgent(LLM())
response = agent.ask("What's the weather in Paris?")
print(response)

Web UI:

python app.py
# Opens at http://localhost:7860

🧠 What I Learned

  1. AI frameworks are just abstractions - LangChain, LlamaIndex do exactly what I built here
  2. Tool calling is pattern matching - Parse LLM output, execute functions
  3. Autonomous agents are loops - Keep going until you get a final answer
  4. Prompt engineering matters - How you ask determines what you get

🤝 Contributing

This is a learning project, but improvements are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit PRs

🙋‍♂️ About Me

I'm Omkar Chebale, learning AI/ML by building from first principles.

Currently seeking opportunities in AI/ML Engineering.


⭐ If you found this helpful, give it a star!

Building in public. Learning in public. Growing in public.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages