Building AI agents from scratch - No LangChain, no frameworks, just pure Python logic.
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.
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.
✅ 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
Try it live: Hugging Face Space
User Query → LLM Decision → Tool Detection → Execute Tool → Format Response
How it works:
- User asks: "What's the weather in Mumbai?"
- LLM responds:
TOOL_CALLING ... - Agent parses and executes tool
- LLM formats result naturally
No magic. Just clean logic.
# 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.pyCreate api keys at here : https://console.groq.com/keys
Past the keys in .env file
from main import AutonomousAgent, LLM
agent = AutonomousAgent(LLM())
response = agent.ask("What's the weather in Paris?")
print(response)python app.py
# Opens at http://localhost:7860- AI frameworks are just abstractions - LangChain, LlamaIndex do exactly what I built here
- Tool calling is pattern matching - Parse LLM output, execute functions
- Autonomous agents are loops - Keep going until you get a final answer
- Prompt engineering matters - How you ask determines what you get
This is a learning project, but improvements are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit PRs
I'm Omkar Chebale, learning AI/ML by building from first principles.
Currently seeking opportunities in AI/ML Engineering.
Building in public. Learning in public. Growing in public.
