Route-and-time-specific hazard copilot for mountain and monsoon road trips: landslides, storms, snow, fog and live closures where you will be, when you will be there. Try extra inputs {"demo": "monsoon"} for an offline run.
Route-and-time-specific hazard intelligence for mountain & monsoon road travel. India-first (Himalaya, Western Ghats, North-East); works anywhere.
"Chandigarh se Manali kal subah 9 baje — safe hai? Kab niklein? Highway khula hai?"
Weather apps forecast a city. Maps know traffic, not landslides. Closure news is scattered across local papers. GhatGuard answers what travellers and operators actually need: what will the road be like where I'll be, when I'll be there, and what should I change? Every claim is backed by model data, a historical record, or a verified source.
CHANGE ROUTE · confidence high
Take route B (NH205, Kataula road, NH3) leaving 04:00: peak risk SEVERE → HIGH, risk-hours 51.4 → 14.6;
it bypasses the landslide near 7 Mile (one-way / partly open).
Ensemble of 4 weather models — P(HIGH+) 100% · P(SEVERE) 100% · agreement 96% (planned start)
- SEVERE on Mandi → Bajaura (km 183–252) around 13:17–16:17: ... known slide zone (4 past landslides within ~3 km)
(offline demo scenario; full outputs in examples/)
Playground → Single agent → ghatguard.
Offline monsoon and seasonal scenarios: expected decision, a verdict for every leg, and a recommendation that actually lowers the risk.
| You send | What happens |
|---|---|
Chandigarh to Manali tomorrow 6am | live assessment: routing, terrain, 4-model weather ensemble, news, verdict |
Shimla se Kaza parso subah 5 baje, bike | Hindi/Hinglish works; the vehicle is read from the text |
Extra inputs {"demo": "monsoon"} | offline scenario: no network, no keys, no LLM credits; same pipeline |
Extra inputs {"demo": "seasonal"} | offline trip two months out → climatology-based seasonal outlook |
Extra inputs {"vehicle": "suv", "window": [4, 12], "style": "hinglish"} | override vehicle, acceptable departure hours, briefing style |
Extra inputs {"trip": {"origin": "Dehradun", "destination": "Joshimath", "depart": "2026-10-20T05:00"}} | structured trip instead of free text |
The run shows the Markdown briefing as the response, the full assessment as structured output, and a
result view (viewer.html): the route map coloured by risk at time of passage, NASA slide zones,
incidents, the risk profile (plan vs recommendation), departure heatmaps and the step trace.
API: POST /api/v1/agents/ghatguard/runs with {"user_input": "...", "inputs": {...}}.
backend/.env, shared with every agent)| Key | Used for | Without it |
|---|---|---|
AICREDITS_API_KEY | the LLM steps (platform LLM, gpt-4o-mini): intake parsing, grounded news extraction, the narrative | the rules-based fallbacks answer (still a full verdict) |
TAVILY_API_KEY / SERPER_API_KEY / BRAVE_API_KEY | live closure news (first one set leads, the others are failover) | no news step; weather, terrain and memory still run |
JINA_API_KEY | full article text via Jina Reader (better extraction) | snippets only |
PUBLIC_API_CONTACT | your email/URL in the User-Agent sent to OpenStreetMap / Open-Meteo (their usage policies ask for it) | a placeholder is sent; set it before heavy use |
Routing, weather, terrain and places use keyless free APIs (Open-Meteo, OSRM demo, Overpass, Nominatim).
intake ─┬─ legN.route ─┬─ legN.terrain ─┬─ legN.news ───────┐
│ │ └─ legN.community ──┤ (legs run concurrently)
│ └─ legN.weather (4-model ensemble) ──┴─ legN.judge ─┐
└─ ... └─ briefing (LLM + FactGuard)
| Step | Job | Data | LLM |
|---|---|---|---|
| Intake | EN/HI/Hinglish → validated legs, vehicle, window | — | optional (rules fallback) |
| Route scout | proximity-disambiguated places, route options, ~70 samples | Open-Meteo geocoding, Nominatim, OSRM | — |
| Terrain | DEM relief 1 km either side of the road; towns, villages, passes | Copernicus DEM via Open-Meteo, Overpass | — |
| Corridor weather | hourly precip/snow/temp/gusts/visibility/WMO codes + 3 days history × 4 models; climatology beyond 14 days | Open-Meteo forecast / ERA5 archive | — |
| Community intel | NASA + verified-report slide-zone prior; incidents remembered from earlier runs | hazard memory | — |
| News intel | geography-driven queries → extraction → grounding → corridor → freshness | Tavily › Serper › Brave | optional (rules fallback) |
| Risk judge | ensemble hazards, stretches, risk-hours, departure × route optimiser, decision policy | — | — |
| Briefing | Markdown/JSON; narrative behind FactGuard | — | optional |
Decisions: GO · GO_WITH_CAUTION · SHIFT_DEPARTURE · CHANGE_ROUTE · POSTPONE · SEASONAL_OUTLOOK ·
INSUFFICIENT_DATA, with confidence from lead time, model agreement, terrain and news coverage.
What makes it trustworthy
| Layer | What it is |
|---|---|
| Time-of-passage risk | simulates when you reach each point (vehicle-specific mountain slowdown, breaks) and scores conditions there, then |
| Probabilistic 4-model ensemble | ECMWF, GFS, ICON, GEM scored independently; risk-averse consensus (level backed by ≥ 40% of models), P(SEVERE), agreement → confidence |
| Real susceptibility prior | bundled NASA Global Landslide Catalog subset: 1,766 rainfall-triggered landslides in India/Nepal/Bhutan (2007–2016) |
| Anti-hallucination by construction | news incidents need a verbatim quote found in the article, a location inside your corridor, and freshness; the LLM narrative is FactGuard-checked (no number it can't trace to the facts). Verdicts never come from an LLM |
| Departure × route optimiser | re-scores every 30-min start over 3 days on every route × every model from data already in memory: zero extra API calls |
| Reliability | per-host circuit breakers, search failover, per-step timeouts and a run deadline (120 s); non-critical steps fail soft |
On the platform, every LLM call goes through the platform client (providers/llm.py), so it shows up on
the run replay with tokens and cost, in Jaeger traces and in Grafana.
evaluation/, Run evaluation on this page or POST /api/v1/evaluations/ghatguard/trigger):
the offline monsoon and seasonal scenarios through the real pipeline. Metrics: decision_match,
verdict_or_clean_error, recommendation_lowers_risk. Costs nothing (no network, no LLM).docker compose exec backend python -m agents.ghatguard.backtest --state Uttarakhand --limit 120.
Thresholds live in risk.py::Thresholds.tests/, 101, offline): unit, property (Hypothesis: more rain or steeper terrain never lowers
risk), a chaos suite (25% of upstream calls failing at random → always a verdict or a clean error), and a
scripted-LLM run with planted hallucinations (both caught). pytest agents/ghatguard.PUBLIC_API_CONTACT); the map uses CARTO basemap tiles.GhatGuard was built as a standalone product. These parts need platform support first and were left out (the original code is in the owner's backup):
store.py still has the corroboration logic): needs an
endpoint and persistent storage shared by the API and the worker.agent.py GhatGuardAgent (platform entry: run inputs → pipeline → AgentResult)
workflow.py async DAG with timeouts agents/ intake · route_scout · terrain · weather · community · news · judge · briefing
providers/ geocode · routing · weather (ensemble) · osm · search (failover) · llm (platform adapter)
risk.py hazard engine + ensemble planner.py optimiser + decision policy
store.py hazard memory + crowd logic report.py Markdown + JSON
config.py settings from backend/.env demo.py offline world (demo mode + tests)
evaluate.py backtest harness backtest.py backtest CLI (python -m agents.ghatguard.backtest)
evaluation/ platform evaluation suite viewer.html result view (map, profile, heatmaps)
data/ NASA GLC South Asia subset tests/ offline test suite
Last run Nov 21, 06:39 PM · a case passes when every metric reaches 90% · open a case for expected vs actual
| Status | Trace ID | Duration | Tokens | Cost | Started | |
|---|---|---|---|---|---|---|
| completedeval | e2b6d100… | 1.2 s | 0 | $0.0000 | Nov 21, 06:39 PM | Replay |
| completedeval | 60880291… | 2.2 s | 0 | $0.0000 | Nov 21, 06:39 PM | Replay |
| completedeval | 25af670a… | 1.8 s | 0 | $0.0000 | Nov 21, 06:39 PM | Replay |
| completedeval | f2b4a130… | 1.1 s | 0 | $0.0000 | Nov 18, 05:35 AM | Replay |
| completedeval | fc5cef2f… | 1.8 s | 0 | $0.0000 | Nov 18, 05:35 AM | Replay |
| completedeval | f5873207… | 1.9 s | 0 | $0.0000 | Nov 18, 05:35 AM | Replay |
| completedeval | f86220da… | 1.1 s | 0 | $0.0000 | Nov 15, 08:41 AM | Replay |
| completedeval | f485f4b2… | 1.9 s | 0 | $0.0000 | Nov 15, 08:41 AM | Replay |
| completedeval | fef4f379… | 1.8 s | 0 | $0.0000 | Nov 15, 08:41 AM | Replay |
| completedeval | c39d5ca1… | 1.2 s | 0 | $0.0000 | Nov 13, 08:56 AM | Replay |
| completedeval | 66780e61… | 1.9 s | 0 | $0.0000 | Nov 13, 08:56 AM | Replay |
| completedeval | e7be9747… | 1.9 s | 0 | $0.0000 | Nov 13, 08:56 AM | Replay |
| completedeval | f7da885e… | 1.2 s | 0 | $0.0000 | Nov 5, 07:05 PM | Replay |
| completedeval | f7da885e… | 1.8 s | 0 | $0.0000 | Nov 5, 07:05 PM | Replay |
| completedeval | f7da885e… | 2.0 s | 0 | $0.0000 | Nov 5, 07:05 PM | Replay |
| completedeval | c888f80d… | 1.1 s | 0 | $0.0000 | Oct 16, 12:18 PM | Replay |
| completedeval | c888f80d… | 1.9 s | 0 | $0.0000 | Oct 16, 12:18 PM | Replay |
| completedeval | c888f80d… | 1.8 s | 0 | $0.0000 | Oct 16, 12:18 PM | Replay |
| completed | c845618d… | 86.4 s | 3976 | $0.0007 | Oct 5, 08:31 PM | Replay |