An intelligent AI agent powered by LangChain, Groq AI, and ReAct framework that can search the web and fetch real-time weather data.
Features • Installation • Usage • Tech Stack • API Keys
- ReAct Framework: Uses reasoning and action to solve complex queries
- Multi-Tool Integration: Combines web search and weather APIs intelligently
- Natural Language Understanding: Ask questions in plain English
- Step-by-Step Reasoning: See how the AI thinks and acts
- Real-time weather data from Weatherstack API
- Temperature, humidity, wind speed, and more
- Support for cities worldwide
- Beautiful visual weather cards
- DuckDuckGo search integration
- Real-time web search results
- No API key required for search
- Fast and accurate results
- Modern gradient design with animations
- Tabbed interface for easy navigation
- Quick query buttons for instant testing
- Fully responsive and mobile-friendly
- Smooth transitions and loading states
- Python 3.8 or higher
- pip package manager
- Modern web browser
git clone https://github.com/YOUR_USERNAME/weather-news-agent.git
cd weather-news-agentcd backend
# Create virtual environment (recommended)
python -m venv .venv
# Activate virtual environment
# Windows:
.venv\Scripts\activate
# Mac/Linux:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txtCreate a .env file in the backend folder:
GROQ_API_KEY=your_groq_api_key_here
WEATHER_API_KEY=your_weatherstack_api_key_hereTerminal 1 - Backend:
cd backend
python app.pyBackend will run on http://localhost:5002
Terminal 2 - Frontend:
cd frontend
# Simply open index.html in your browser
# Or use a simple HTTP server:
python -m http.server 8000Then visit http://localhost:8000
- Visit console.groq.com
- Sign up for a free account
- Navigate to API Keys section
- Create a new API key
- Copy and paste into
.envfile
- Visit weatherstack.com
- Sign up for a free account (1000 requests/month free)
- Copy your API key from the dashboard
- Paste into
.envfile
- DuckDuckGo search works out of the box
- No registration or API key required
- Completely free to use
"Find the capital of Pakistan, then get its current weather"
"What is the weather in Karachi today?"
"Search for latest news about AI in Pakistan"
"Tell me about the weather in London and latest news there"
Islamabad
Karachi
New York
Tokyo