A conversational Weather AI Agent with a FastAPI backend (using Google Gemini, OpenWeather & ElevenLabs STT/TTS) and React for seamless text-and-voice forecasts and historical query.
This project is built with fastAPI server and a REACT frontend. Gemini 2.0 flash and elevelabs funcionalities are used as AI components. Follow these steps to set up and run the project locally.
git clone <repository_url>
cd <repository_folder>cd agent-server
# Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtCreate a .env file inside the agent-server directory with the following contents:
GOOGLE_API_KEY=your_google_api_key
OPENWEATHER_API_KEY=your_openweather_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key
Replace the placeholders with your actual API keys.
Before running the server, make sure you are authorized in firsestore, otherwise commentout line no 38-51 agent-server/agent_utils.js
uvicorn main:app --reloadThe backend server will be available at http://localhost:8000.
cd frontend
# Install dependencies
npm install
# Start the development server
npm startThe frontend will run at http://localhost:3000.
- Make sure the backend server is running before starting the frontend.
- If needed, update the frontend's API base URL to match the backend server.
