Logo Lanfrica

johnmwangimegwe/kenya-climate-agent

Domaine:

climategeospatial

Type de record:

softwareproject
Créateur:
joh
Hôte:
Reasoning Over Earth Engine: An AI Agent for Kenya's Climate Risk # **🌍 Reasoning Over Earth Engine: An AI Agent for Kenya's Climate Risk** Ask a question : *"Which counties in Kenya face the highest flood risk this season, and who is most exposed?"* , and get a grounded, ranked, explainable answer drawn from satellite data, population exposure, and authoritative Kenyan documents. This project is an **open replica of the Gemini-powered Geospatial Reasoning pattern announced at Google I/O 2026**. It runs on **Gemini 3.5 Flash** and the **free Earth Engine tier** , it is *not* Google's gated Geospatial Reasoning agent, but it demonstrates the same architecture, end to end, on Kenyan data. --- ## **Overview** A natural-language question is decomposed by a Gemini planner into a tool plan. An orchestrator runs the tools, each an expert "sub-agent", and a fusion layer synthesizes a grounded answer: - **Knowledge Retrieval (RAG)**: retrieves Kenyan climate documents with sources - **Earth Engine**: flood (Sentinel-1 SAR), rainfall (CHIRPS), elevation (SRTM) - **Population**: exposed population per county (WorldPop) - **Risk Scoring**: a transparent, auditable weighted score (no ML) Everything degrades gracefully: with no API key or Earth Engine auth, the agent still runs using deterministic fallbacks, so it never hard-fails in a demo. ## **Architecture** ``` Question │ ▼ Gemini 3.5 Flash (planner.py) │ structured JSON plan ▼ Orchestrator (orchestrator.py) │ dispatches tools (sub-agent pattern) ┌────────────────────┼────────────────────┬───────────────────┐ ▼ ▼ ▼ ▼ search_knowledge get_earth_engine_layers get_population_ compute_risk_ (RAG / FAISS) (Sentinel-1/CHIRPS/SRTM) exposure score │ │ │ │ └────────────────────┴──────────┬─────────┴───────────────────┘ ▼ Fusion (fusion.py, Gemini 3.5 Flash) │ ranked + explained + cited ▼ Answer → Visualization (viz.py) → Streamlit UI ``` ## **I/O 2026 …