An intelligent outfit recommendation system that combines real-time weather data, calendar activities, and personal preferences to suggest what to wear each day.
πΉ Watch Demo Video (3 minutes)
- Weather-Aware Recommendations: Fetches real-time weather data from OpenWeatherMap
- AI-Powered Suggestions: Uses Google Gemini AI to generate contextual outfit recommendations
- Calendar Integration: Google Calendar integration to consider scheduled activities
- Cloud Preference Storage: Vertex AI Memory Bank for persistent preference storage across sessions
- Preference Learning: Learns and applies your personal style preferences (business casual, color preferences, clothing dislikes)
- Interactive CLI: Simple command-line interface for easy interaction
- Dual Storage: Cloud-based preferences with automatic local backup for offline access
- Python 3.8 or higher
- Google AI API key (for Gemini)
- OpenWeatherMap API key
- Google Calendar OAuth credentials (credentials.json)
- Google Cloud project with Vertex AI enabled
- Vertex AI Agent Engine instance configured
- Clone this repository:
git clone <your-repo-url>
cd weatheritbetter-clean- Install dependencies:
pip install -r requirements.txt- Set up your credentials:
cp .env.example .env- Edit
.envand add your API keys:
GOOGLE_API_KEY=your_actual_google_ai_key_here
OPENWEATHER_API_KEY=your_actual_openweather_key_here
-
Set up Google Calendar credentials:
- Follow the instructions in API_CREDENTIALS.md
- Download
credentials.jsonto the project root directory - On first run, you'll be prompted to authorize calendar access
-
Set up Vertex AI Memory Bank for cloud-based preference storage:
- Create a Google Cloud project
- Enable Vertex AI API
- Create an Agent Engine instance
- Add
GOOGLE_CLOUD_PROJECT,GOOGLE_CLOUD_LOCATION, andAGENT_ENGINE_IDto.env - Authenticate:
gcloud auth application-default login
See API_CREDENTIALS.md for detailed instructions on obtaining all credentials.
Important: Make sure you have the correct package versions installed:
google-genai >= 1.50.0google-adk[vertexai] >= 1.19.0websockets >= 15.0.1
python src/main.pyGet an outfit recommendation:
You: recommend Manila
Add a preference:
You: pref I prefer business casual style
General chat:
You: I don't like wearing shorts
Exit:
You: quit
weatheritbetter-clean/
βββ README.md # This file
βββ requirements.txt # Python dependencies
βββ .env.example # Template for environment variables
βββ .gitignore # Git ignore rules (excludes credentials)
β
βββ src/ # Source code
β βββ main.py # Entry point - interactive CLI
β βββ config.py # Configuration loader
β β
β βββ agents/ # Agent modules
β β βββ weather_agent.py # Weather data fetcher
β β βββ activity_agent.py # Calendar integration
β β βββ preference_agent.py # Preference management with Memory Bank
β β βββ recommendation_agent.py # Main recommendation engine
β β
β βββ utils/ # Utility modules
β βββ observability.py # Logging and tracing
β βββ location_utils.py # Location helpers
β
βββ scripts/ # Utility scripts
β βββ create_agent_engine.py # Setup Vertex AI Agent Engine
β βββ push_preferences.py # Push local prefs to Memory Bank
β βββ resync_preferences.py # Re-sync preferences
β
βββ docs/ # Documentation
β βββ API_CREDENTIALS.md # How to get API keys & setup guides
β
βββ examples/ # Example scripts
β βββ simple_recommendation.py # Basic usage example
β βββ with_observability.py # Example with tracing
β
βββ data/ # Data storage (gitignored)
βββ preferences.json # Local backup of preferences
- Weather Fetching: Uses OpenWeatherMap API to get current weather conditions for your location
- Activity Detection: Reads your Google Calendar to understand your daily activities
- Preference Learning: Saves your style preferences and temperature sensitivities
- AI Generation: Combines all context and uses Google Gemini AI to generate personalized outfit recommendations
- Continuous Learning: Your preferences are saved and applied to future recommendations
Fetches real-time weather data including:
- Current temperature and "feels like" temperature
- Weather conditions (sunny, rainy, cloudy, etc.)
- Humidity and wind speed
- Location information
Integrates with Google Calendar to detect:
- Meeting formality levels (casual, business casual, formal)
- Exercise activities
- Indoor vs outdoor events
- Time-based planning
Manages your personal preferences with Vertex AI Memory Bank:
- Style preferences (casual, formal, business casual)
- Temperature sensitivity
- Color preferences
- Clothing dislikes
- Cloud storage: Preferences synced to Vertex AI Memory Bank for persistence
- Local backup: Automatically backed up to
data/preferences.json - Semantic retrieval: Uses AI to intelligently retrieve relevant preferences
Main orchestrator that:
- Combines weather, activities, and preferences
- Builds context for AI model
- Generates specific, actionable outfit recommendations
- Explains reasoning behind suggestions
IMPORTANT: This repository does NOT contain any real API keys or credentials.
- Never commit your
.envfile - Never commit
credentials.jsonortoken.json - Never share your API keys publicly
- All sensitive files are listed in
.gitignore
See .env.example for the template of required environment variables.
The application uses Vertex AI Memory Bank for persistent, cloud-based preference storage across sessions. Preferences are automatically synchronized to the cloud and also backed up locally to data/preferences.json.
Features:
- β Persistent storage across sessions and devices
- β Semantic search for intelligent preference retrieval using similarity matching
- β
Automatic local backup to
data/preferences.jsonfor offline access - β User-scoped memories - each user's preferences are isolated by email
- β Smart consolidation - Memory Bank's AI intelligently merges related preferences
How it works:
- When you add preferences (e.g., "I prefer business casual"), they're saved locally
- The preference is converted to a natural conversation and sent to Memory Bank
- Memory Bank's LLM extracts facts and stores them as semantic memories
- On app startup, preferences are retrieved using semantic search
- Retrieved preferences are merged with local storage for fast access
Setup:
- Create a Google Cloud Project
- Enable Vertex AI API
- Create an Agent Engine instance using
scripts/create_agent_engine.py(see API_CREDENTIALS.md) - Set up authentication:
gcloud auth application-default login - Add credentials to your
.env:
GOOGLE_CLOUD_PROJECT=123456789012 # Your project NUMBER (not ID)
GOOGLE_CLOUD_LOCATION=us-central1 # Your preferred region
AGENT_ENGINE_ID=1234567890123456 # Numeric ID only
Verification: When you start the app, you'll see:
β
Vertex AI Memory Bank connected successfully!
Storage: Cloud-based (Vertex AI)
Backup: Local file (data/preferences.json)
π₯ Loading preferences from Vertex AI Memory Bank...
β
Loaded X preferences from cloud
This confirms your preferences are being saved to and loaded from the cloud.
Utility Scripts:
scripts/push_preferences.py- Push local preferences to Memory Bankscripts/resync_preferences.py- Re-sync preferences from local file
Key dependencies:
google-genai >= 1.50.0- Google Gemini AI SDKgoogle-adk[vertexai] >= 1.19.0- Google Agent Development Kit for Vertex AI Memory Bankwebsockets >= 15.0.1- WebSocket support (required by google-adk)requests >= 2.31.0- HTTP requests for weather APIpython-dotenv >= 1.0.0- Environment variable managementgoogle-auth >= 2.23.0- Google authenticationgoogle-api-python-client >= 2.100.0- Google Calendar API
See requirements.txt for complete list with specific version constraints.
Note: Package versions are important for compatibility. The google-adk package requires google-genai >= 1.50.0 and websockets >= 15.0.1.
"Missing required environment variables"
- Make sure you've created
.envfrom.env.example - Check that all required API keys are set
"Invalid API key"
- Verify your API keys are correct
- Check if API keys have proper permissions enabled
"City not found"
- Try using the full city name
- Use English spelling
- Try adding country code (e.g., "Manila, PH")
Calendar not working
- Make sure you've set
use_calendar=Truein main.py - Verify
credentials.jsonexists - Re-authenticate by deleting
token.jsonand running again
This is a capstone project. If you'd like to extend it:
- Fork the repository
- Create a feature branch
- Make your changes
- Ensure all credentials are excluded
- Submit a pull request
This project is for educational purposes as part of a Kaggle capstone submission.
- Google Gemini AI for intelligent recommendations
- OpenWeatherMap for weather data
- Google Calendar API for activity detection
For questions about this project, please open an issue on GitHub.
Built with Google Gemini AI and Claude Code as part of the Google x Kaggle 5-Day AI Agents Intensive Course Capstone Project