Life Copilot is your intelligent daily assistant that transforms how you prepare for and manage your day. It's like having a personal concierge that analyzes your calendar, weather, commute, and upcoming events to provide proactive recommendations, reminders, and essential preparations.
Life Copilot acts as your daily preparation partner by:
- π Calendar Intelligence: Connects to your Google Calendar and analyzes upcoming events
- π€οΈ Weather-Aware Planning: Considers weather conditions for outdoor events and commutes
- π Smart Commute Management: Calculates optimal departure times and suggests on-the-way stops
- ποΈ Proactive Shopping: Identifies what you need for special occasions and finds the best products
- π± Automated Reminders: Creates calendar reminders for purchases, departures, and preparations
- π€ AI-Powered Insights: Uses LLM to understand event context and provide tailored recommendations
- Automated Morning Reports: Generated every morning at 7:00 AM (configurable)
- Comprehensive Overview: Weather, commute times, first 3 events, and personalized plans
- Smart Reminders: Automatically creates "Leave by" reminders in your calendar
- Markdown Reports: Saves detailed reports to
data/reports/brief-YYYYMMDD.md
- Date Night Planning: Suggests flowers, restaurants, and romantic stops along your route
- Interview Preparation: Recommends professional attire, accessories, and preparation items
- Birthday Party Prep: Identifies gifts, decorations, and party essentials
- Outdoor Event Planning: Considers weather and suggests appropriate gear
- Generic Meeting Support: Provides standard preparation checklists
- Amazon Product Search: Finds the best products using Rainforest API
- Intelligent Scoring: Evaluates products on quality, value, delivery speed, and relevance
- Order-by Reminders: Automatically calculates when to order items for timely delivery
- Budget-Aware Recommendations: Considers your budget preferences and event timing
- Route-Optimized Suggestions: Finds coffee shops, florists, gift shops along your commute
- Detour Analysis: Shows how much extra time each stop adds to your journey
- Contact Information: Provides phone numbers and addresses for easy calling/ordering
- Calendar Integration: Can add stop reminders directly to your calendar
- Google Calendar Integration: Full OAuth2 integration with your calendar
- Event Analysis: Understands event context and timing
- Smart Reminders: Creates contextual reminders based on event type
- Schedule Import: Upload and parse various schedule formats (CSV, PDF, images)
- Real-time Conditions: Current temperature, UV index, and precipitation
- Hourly Forecasts: Next 6 hours of weather data
- Event Planning: Weather-aware recommendations for outdoor activities
- Commute Planning: Considers weather impact on travel times
"I have a dinner date at 7 PM at a fancy restaurant downtown"
What Life Copilot does:
- Analyzes the event: Identifies it as a romantic dinner
- Checks weather: "It's 75Β°F and sunny - perfect for the outdoor seating area"
- Calculates commute: "Leave by 6:15 PM to arrive on time (45 min drive)"
- Suggests preparations:
- "Order flowers by 2 PM today" β Creates calendar reminder
- "Pick up flowers at Rose Garden Florist (+8 min detour, call 555-0123)"
- "Consider a nice bottle of wine from Wine & Spirits (+5 min detour)"
- Creates reminders: "Leave by 6:15 PM" automatically added to calendar
"I have a job interview tomorrow at 2 PM at TechCorp"
What Life Copilot does:
- Identifies the event type: Professional interview
- Recommends essentials:
- "Professional leather belt - $25, Prime delivery by tomorrow"
- "Portfolio folder - $12, same-day delivery available"
- "Tie clip - $15, order by 6 PM today"
- Weather considerations: "Partly cloudy, 68Β°F - perfect for a blazer"
- Route planning: "Leave by 1:15 PM (30 min drive + 15 min buffer)"
- OTW suggestions: "Coffee shop 2 blocks from interview location for pre-interview coffee"
"My daughter's birthday party is this Saturday at 3 PM"
What Life Copilot does:
- Party planning mode: Identifies birthday celebration
- Gift recommendations:
- "Age-appropriate toys and games"
- "Party decorations and balloons"
- "Cake decorations and candles"
- Weather planning: "Sunny, 78Β°F - perfect for outdoor party games"
- Shopping timeline: "Order decorations by Thursday for Saturday delivery"
- OTW stops: "Party City on your way home (+12 min detour) for last-minute items"
"I have a 5K run this Sunday morning at 8 AM"
What Life Copilot does:
- Weather analysis: "Cool morning, 55Β°F - perfect running weather"
- Gear recommendations:
- "Moisture-wicking running shirt - $18, Prime delivery"
- "Energy gels for race day - $12, order by Friday"
- Preparation reminders: "Lay out running clothes tonight"
- Route planning: "Leave by 7:30 AM (20 min drive to start line)"
- Post-race planning: "Coffee shop near finish line for post-race celebration"
- Daily Brief Generated: Comprehensive report with weather, commute, and first 3 events
- Leave-by Reminder: Automatically calculated and added to calendar
- Event Analysis: AI reviews upcoming events and suggests preparations
- Shopping Alerts: Notifications for items that need to be ordered today
- Real-time Traffic: Current ETA and optimal departure time
- OTW Suggestions: Coffee shops, florists, or gift shops along your route
- Weather Updates: Current conditions and hourly forecast
- Event Reminders: Last-minute preparations for today's events
- Smart Product Search: AI finds the best items for your specific needs
- Order Timing: Calculates when to order items for timely delivery
- Calendar Integration: Shopping reminders automatically added to calendar
- Budget Management: Considers your spending preferences and event budgets
- Final Reminders: Last-minute preparations and departure times
- Weather Check: Current conditions and any weather-related adjustments
- OTW Navigation: Real-time suggestions for stops along your route
- Post-Event: Follow-up reminders and preparation for next events
- Backend: FastAPI (Python 3.11+)
- Frontend: Streamlit
- LLM: Ollama (local), optional HuggingFace/Groq later
- Scheduler: APScheduler (daily brief automation)
- APIs:
- Weather (open/free)
- Commute (Mapbox/OSM)
- Amazon Catalog (Rainforest API)
- Google Calendar API (OAuth2)
- Python 3.11+
- Ollama installed and running
- Google Calendar API credentials
- Mapbox API key (for commute routing)
- Rainforest API key (for Amazon product search)
- OpenWeather API key (for weather data)
-
Clone the repository
git clone <repository-url> cd life_copilot
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the project root:# API Keys OPENWEATHER_API_KEY=your_openweather_key MAPBOX_ACCESS_TOKEN=your_mapbox_token RAINFOREST_API_KEY=your_rainforest_key # Google Calendar (will be set up during first run) GOOGLE_CREDENTIALS_FILE=data/google_token.json # Location (default to Phoenix, AZ) DEFAULT_LAT=33.424 DEFAULT_LON=-111.928 # Daily Brief Settings BRIEF_ENABLED=true BRIEF_TIME=07:00
-
Configure your profile Create
data/profile.json:{ "user_role": "student", "default_gift_budget": 30, "default_interview_budget": 25, "prime_preferred": true, "lat": 33.424, "lon": -111.928 } -
Set up commute configuration Create
data/commute.json:{ "home": {"lat": 33.424, "lon": -111.928}, "office": {"lat": 33.448, "lon": -111.928}, "arrive_by": "09:00", "buffer_minutes": 10 } -
Start the services
# Terminal 1: Start the API server uvicorn api.main:app --reload --port 8000 # Terminal 2: Start the web interface streamlit run web/app.py --server.port 8501
-
Access the application
- Web Interface: http://localhost:8501
- API Documentation: http://localhost:8000/docs
- Connect Google Calendar: Click "Connect Google Calendar" in the web interface
- Test Weather: Click "Fetch weather" to verify weather API
- Test Commute: Click "Check commute" to verify routing
- Run Daily Brief: Click "Run brief now" to generate your first report
life_copilot/
βββ api/ # FastAPI backend
β βββ main.py # Main API server
β βββ agent.py # LLM planning and decision making
β βββ brief.py # Daily brief generation
β βββ llm.py # LLM integration (Ollama)
β βββ scoring.py # Product scoring algorithm
β βββ tools_*.py # API integrations (weather, commute, calendar, etc.)
β βββ schedule_*.py # Schedule parsing and import
βββ web/ # Streamlit frontend
β βββ app.py # Main web interface
βββ data/ # Configuration and data storage
β βββ profile.json # User profile and preferences
β βββ commute.json # Home/office locations and commute settings
β βββ google_token.json # Google Calendar OAuth tokens
β βββ reports/ # Generated daily briefs
βββ agent/ # LangGraph agent components
β βββ graph.py # Agent workflow graph
β βββ prompts.py # LLM prompts and templates
βββ requirements.txt # Python dependencies
- Time: Configure when the daily brief is generated (default: 7:00 AM)
- Enable/Disable: Turn daily brief on or off
- Leave-by Reminders: Automatically create calendar reminders for departure times
The system recognizes these event types and provides tailored recommendations:
dinner_date- Romantic dinner planningchild_birthday- Birthday party preparationinterview- Job interview preparationmorning_commute- Standard work commutegeneric_meeting- Business meeting preparationoutdoor_event- Weather-dependent outdoor activities
- Budget Defaults: Set default budgets for different event types
- Prime Preference: Prefer Amazon Prime eligible items
- Delivery Timing: Calculate optimal order times for event deadlines
- Default: Ollama (local, privacy-focused)
- Models: Supports various Ollama models
- Fallback: Graceful degradation if LLM is unavailable
- Event Analysis: Understands event context and requirements
- Weather Integration: Considers weather in all recommendations
- Timing Optimization: Calculates optimal order and departure times
- Route Planning: Suggests efficient stops along commute routes
GET /weather- Current weather and hourly forecastGET /commute- Commute times and route optimizationGET /calendar/events- Today and tomorrow's calendar eventsPOST /calendar/reminder- Create calendar reminders
POST /agent/plan- Generate event-specific plansPOST /agent/act- Get product recommendations and OTW stopsGET /catalog/search- Search Amazon productsPOST /catalog/order_reminder- Create order-by reminders
POST /brief/run- Generate daily brief immediatelyPOST /brief/config- Configure daily brief settings
POST /schedule/ingest- Upload and parse schedule filesPOST /schedule/commit- Add parsed events to calendar
- Local LLM: Ollama runs locally, keeping your data private
- OAuth2: Secure Google Calendar integration
- No Data Storage: Personal data is not stored permanently
- API Keys: All external API keys are environment variables
- Ollama not running: Start Ollama service before running the application
- API keys missing: Ensure all required API keys are in your
.envfile - Calendar connection failed: Check Google Calendar API credentials
- Weather data unavailable: Verify OpenWeather API key and location settings
Enable debug logging by setting DEBUG=true in your .env file.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Life Copilot - Your intelligent daily preparation assistant. Never be unprepared for life's important moments again! π