HackIconics
- Problem Statement Number: 5 (Weather Intelligence)
- Problem Statement Title: Chronos โ Weather-Adaptive Planning Assistant
โMost apps tell you itโs raining. Chronos tells you what to do about it.โ โ Team HackIconics
Chronos is a weather-intelligent planning companion that fuses large-language-model reasoning with live (or simulated) meteorological data to eliminate guesswork from outdoor itineraries.
- Challenge: Traditional planners are staticโthey only alert you after weather ruins the plan. Chronos reasons before it acts, asking โdoes weather even matter?โ and adapting proactively when it does.
- Audience: Individuals, families, logistics leads, and hackathon evaluators who need provably safe itineraries with minimal manual research.
- Value Proposition: The agent rejects infeasible ideas (e.g., โbeach day in an inland cityโ), quantifies weather risk with transparent reasoning, and always offers a weather-optimized alternative so users can act with confidence.
Key Capabilities (from PPT narrative)
- Temporal Tetris: Dynamically reschedules steps to sidestep bad weather instead of simply cancelling plans.
- Rain-Aware Buffers: Injects travel/transition buffers when precipitation is likely, modeling โprogrammatic empathy.โ
- Decision Transparency: Displays Option A vs. Option B plus a reasoning trace, so stakeholders see why recommendations changed.
- Resilient Demos: Simulation mode mirrors the real pipeline to guarantee stable judging sessions even without network access.
- Programming Language(s): Python 3.10+
- Frameworks / Libraries: Streamlit, asyncio, Pydantic 2, pydantic-ai, httpx, python-dotenv
- LLMs / APIs: Google Gemini 2.5 Flash (via pydantic-ai), wttr.in weather API, ip-api/ipapi/wttr geolocation cascade
- Database / Vector Store: Not required; in-memory cache handles transient weather data
- Deployment: Streamlit runtime (local machine or Streamlit Community Cloud)
- Experience Layer (
app.py): Streamlit UI with a long-lived asyncio loop, IP-based location detection, multi-day date range pickers, and grouped task rendering. Session state persists user inputs, weather pulls, and previously generated plans for live demos. - Reasoning Core (
agent.py): Agentic pipeline (Gemini 2.5 Flash via pydantic-ai) that performs a mandatory feasibility gate, classifies weather relevance, selectively calls weather tools, then orchestrates dual-plan generation (Option A vs. Option B) with explicit risk deltas. - Schema & Validation (
models.py): Strongly typedChronosResponse,PlanOption, andTaskStepmodels force deterministic controlโinvalid LLM output is rejected before reaching the UI. - Weather Services (
tools.py): Cache-first adapter around wttr.in plus deterministic simulation mode, ensuring continuity even when live forecasts exceed the API window. - Intelligence Utilities (
utils.py): Activity classifiers for outdoor sensitivity, rain-aware buffer injectors, IP geolocation cascade, natural-language date parsing, and risk scoring heuristics (Temporal Tetris + Programmatic Empathy). - Transparency & Safety: Decision trace objects reveal why each adjustment happened. A fallback strategy mirrors the presentation deck: if the weather API fails, Chronos auto-switches to simulation without breaking the user flow.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ User Input Layer โ
โ (Task Description + Location + Date Range) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Streamlit UI (app.py) โ
โ - Location auto-detect via IP โ
โ - Multi-day date range picker โ
โ - Session state persistence โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Chronos Agent (agent.py) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 1. FEASIBILITY GATE โ Validate location & activity โ โ
โ โ โโ Infeasible? โ Suggest alternative โ โ
โ โ โโ Feasible? โ Continue โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ 2. WEATHER RELEVANCE โ Classify activity sensitivity โ โ
โ โ โโ Not relevant? โ Skip weather tools โ โ
โ โ โโ Relevant? โ Fetch forecast โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโดโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ Weather Tools โ โ Intelligence โ
โ (tools.py) โ โ Utilities โ
โ โ โ (utils.py) โ
โ - wttr.in API โ โ โ
โ - Cache (30min โ โ - Activity โ
โ TTL) โ โ classification โ
โ - Simulation โ โ - Risk scoring โ
โ mode โ โ - Buffer inject โ
โ - Fallback โ โ - Date parsing โ
โโโโโโโโโโโโโโโโโโฌโโ โโโโโโโโโโฌโโโโโโโโโโ
โ โ
โโโโโโโฌโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 3. DUAL PLAN GENERATION โ
โ โโ Option A: Original plan โ
โ โโ Option B: Weather-optimized plan โ
โ โโ Risk delta analysis โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Pydantic Schema Validation โ
โ (models.py) โ
โ - ChronosResponse โ
โ - PlanOption โ
โ - TaskStep โ
โ - WeatherCondition โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Streamlit UI Rendering โ
โ - Display plan options โ
โ - Risk indicators & reasoning โ
โ - Save plan to history โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
User Input: "Plan a beach day in Miami for tomorrow"
โ
Feasibility: โ
Miami has beaches (valid location)
โ
Weather Relevance: โ
Beach activities highly weather-sensitive
โ
Fetch Forecast: Get Miami weather for tomorrow (from cache/API)
โ
Risk Assessment:
- Option A: Original (10 AM - 6 PM beach) โ HIGH RISK (60% rain predicted)
- Option B: Optimized (Early morning 7-11 AM, shift indoors if needed) โ MEDIUM RISK
โ
Display Plans: User sees both options with risk deltas and reasoning trace
Scenario: Family wants to plan a week-long holiday itinerary
Before Chronos: Check weather manually, cancel or reschedule last-minute
With Chronos:
- โ Submit multi-day itinerary (beach โ hiking โ city tour)
- โ Chronos identifies weather-sensitive activities (hiking risky if stormy)
- โ Generates optimized schedule with rain-aware buffers
- โ Family adjusts plan proactively instead of mid-trip surprises
Scenario: Wedding planner organizing outdoor ceremony + reception
Before Chronos: Relies on manual weather checks and contingency plans
With Chronos:
- โ Submit ceremony time + reception venue + potential rain date
- โ Chronos calculates precipitation risk windows
- โ Suggests optimal timing or covered alternatives
- โ Provides decision trace for stakeholder communication
Output Example:
- Option A: Outdoor ceremony 4 PM Saturday โ 75% rain risk
- Option B: Shift to 10 AM Sunday (45% rain) + have tent setup ready
Scenario: Logistics coordinator planning daily delivery routes
Before Chronos: Static route planning, weather incidents cause delays
With Chronos:
- โ Input: 5 delivery stops in different neighborhoods
- โ Chronos identifies weather-sensitive stops (outdoor waits, sensitive cargo)
- โ Reorders route to avoid peak rain windows
- โ Injects travel buffers between stops when flooding likely
- โ Real-time plan adjustment minimizes missed deliveries
Scenario: Teacher planning outdoor educational excursion
Before Chronos: Limited weather adaptation, trip often cancelled
With Chronos:
- โ Submit planned activities: outdoor nature walk + museum backup
- โ Chronos auto-detects weather sensitivity level
- โ If rain forecast: Generates alternate indoor itinerary (same curriculum)
- โ Provides risk transparency for parent communication
Scenario: Tournament organizer with multiple outdoor match venues
Before Chronos: Weather delays, last-minute cancellations
With Chronos:
- โ Input: 6 tennis matches across 3 courts over 2 days
- โ Chronos identifies wind-sensitive (tennis) vs. rain-sensitive (soccer) conflicts
- โ Suggests reordering: Schedule wind-sensitive matches in morning slot
- โ Provides rain contingency (covered courts) with time buffers
Scenario: Disaster relief coordinator planning supply distribution
Before Chronos: Weather surprises affect critical aid delivery
With Chronos:
- โ Input: Multiple aid checkpoints across flood-prone areas
- โ Chronos calculates flooding risk per location per time window
- โ Generates safe routes avoiding peak rain / mudslide windows
- โ Decision trace helps justify routing to incident commanders
Scenario: Judges want to see stable demo without live API calls
With Chronos Simulation Mode:
- โ
Set
SIMULATION_MODE=truein.env - โ Deterministic simulated weather for consistent judging experience
- โ Same LLM reasoning pipeline as production
- โ No API throttling, no network failures
- โ Reproducible results for every demo run
Before starting, ensure you have the following installed on your laptop:
- ๐ Python 3.10+ (Download here)
- ๐ง Git (Download here)
- ๐ Google Gemini API key (Get it here)
Copy the project to your laptop:
git clone https://github.com/WIBD-Vadodara/HackIconics.git
cd HackIconicsCreate an isolated environment for the project:
On Windows (PowerShell):
python -m venv .venv
.venv\Scripts\Activate.ps1On macOS/Linux (Terminal):
python -m venv .venv
source .venv/bin/activateInstall all required packages:
pip install -r requirements.txtCreate a .env file in the project root and add your Google Gemini API key:
# Create the .env file
cd HackIconics
# On Windows (PowerShell): echo "GEMINI_API_KEY=your-api-key-here" > .env
# On macOS/Linux: echo "GEMINI_API_KEY=your-api-key-here" > .envOr simply open a text editor, create a file named .env in the HackIconics/ folder and paste:
GEMINI_API_KEY=your-api-key-here
Replace your-api-key-here with your actual Google Gemini API key.
Once setup is complete, start the application:
streamlit run app.pyโจ The app will open automatically in your browser at http://localhost:8501
| โ Issue | โ Solution |
|---|---|
| Python command not found | Ensure Python is installed and added to PATH. Restart your terminal. |
.venv not activating |
Use python -m venv .venv again, then activate it. |
| Module not found error | Ensure your virtual environment is activated and run pip install -r requirements.txt. |
| API key errors | Double-check your .env file has the correct format: GEMINI_API_KEY=<your-key>. |
| Port 8501 already in use | Run streamlit run app.py --server.port 8502 to use a different port. |
To test the app without an API key (using simulated weather data):
echo "SIMULATION_MODE=true" >> .env
streamlit run app.pyFor deployment servers, use headless mode:
streamlit run app.py --server.headless true --server.port 8080- ๐จ
/app.pyโ Streamlit UI, session state, and rendering logic - ๐ค
/agent.pyโ pydantic-ai agent orchestration and prompt builder - ๐
/models.pyโ Typed response schema shared between UI and agent - โ
/tools.pyโ Weather tooling, caching, and wttr.in adapter - ๐ ๏ธ
/utils.pyโ Location parsing, classification, and risk helpers - ๐ฆ
/assetsโ Branding, screenshots, or architecture diagrams - ๐
/requirements.txtโ Python dependencies - ๐
/README.mdโ Reference template supplied by organizers
- ๐ฉโ๐ป Nancy Vaghela โ @nancy325 ยท nancysvaghela@gmail.com
- ๐ฉโ๐ป Bhakti Moteriya โ @Bhakti1112 ยท bhaktimoteriya465@gmail.com
- ๐ฉโ๐ป Isha Patel โ @Isha1530 ยท ishahp150305@gmail.com
- ๐จโ๐ป Arya Mehta โ @aryamehta0302 ยท aryamehta0302@gmail.com
- ๐ Explicit city/state/country inputs always override auto-detect; the agent never invents or infers missing locations.
- ๐ wttr.in provides three-day forecasts; for longer horizons, Chronos switches to clearly labeled simulated estimates to avoid misinformation.
- ๐พ Plans and decision traces live in Streamlit session state onlyโno external database is provisioned to keep the footprint light for the hackathon.
- ๐ IP detection relies on free tiers (ip-api, ipapi, wttr); excessive requests may trigger throttling, so manual entry remains available.
- ๐ Future Vision (from PPT): Extend Chronos beyond personal planning into logistics optimization, emergency response scheduling, and field operations coordination wherever weather, time, and critical decisions intersect.
- ๐ Roadmap Ideas: Calendar integrations, proactive alerts, multi-user persistence, geospatial feasibility datasets, and richer "programmatic empathy" rules for edge-case conditions.
This project was developed as part of WiBD GenAI Hackathon 2026 and all code was written during the hackathon period.