🛰️ A Streamlit app powered by an LLM Agent (Google ADK) to analyze, query, and visualize reforestation data in Madagascar, in order to support the NGO Interaide in their reforestation and sustainable development mission.
ReforestAI combines AI-powered geospatial reasoning and interactive mapping to support reforestation analysis.
It integrates:
- 🗺️ GeoJSON layers (Fokontany boundaries, Grevillea plantations, Reforestation zones)
- 🤖 Google ADK Agent for natural language queries
- 📊 Folium maps for beautiful visualizations
Watch a quick demo of the ReforestAI agent in action.
See the demo at demo.mp4
✅ Interactive chat interface to run spatial and attribute queries
✅ Dynamic Folium maps with Stamen Terrain base layer
✅ Tools for:
- Spatial joins & geometry enrichment
- Attribute filtering
- Map export to PNG/HTML
📦 ReforestAI
┣ 📂 app/
┃ ┗ 📜 streamlit_app.py → Streamlit frontend (UI + API calls)
┣ 📂 reforestAI-agent/
┃ ┣ 📜 agent.py → LLM Agent definition (Google ADK)
┃ ┗ 📜 tools.py → Geospatial utilities (GeoPandas, Folium)
┣ 📂 Map_Data/geojson/ → Sample GeoJSON datasets
┃ ┣ 📜 Fokontany.geojson
┃ ┣ 📜 Grevillea.geojson
┃ ┗ 📜 Reboisement.geojson
┣ 📂 output/ → Generated maps & exports
┣ 📜 requirements.txt
┗ 📜 README.md
- 🐍 Python 3.10+ (3.12 recommended)
- 🔑 Google API Key for the LLM agent
- 📦 Dependencies listed in
requirements.txt(GeoPandas, Fiona, Folium, etc.)
- 🐳 Docker 20.10+
- 🧩 Docker Compose v2+
💡 On Windows, use Docker Desktop. On Linux/macOS, install Docker Engine + Compose Plugin.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython -m venv .venv
. .venv\Scripts\Activate.ps1
pip install -r requirements.txt1️⃣ Copy the example environment file:
cp reforestAI-agent/.env.example reforestAI-agent/.env2️⃣ Add your API key:
GOOGLE_API_KEY=<your_key>
You can create an API key at Google AI Studio
adk api_serverThe server must listen on
http://localhost:8000and expose the appreforestAI-agent.
streamlit run app/streamlit_app.pyIn the sidebar, create a session and start exploring spatial data through chat prompts.
The repository includes a Dockerfile (for the app) and a docker-compose.yml orchestrating:
agent: Google ADK serverweb: Streamlit web interface- A volume for
output/to retrieve exported maps
Environment variables: ensure
reforestAI-agent/.envcontains yourGOOGLE_API_KEY.
docker compose up --build- Streamlit (Web UI): http://localhost:8501
- “Show me a map of the Antavibe with grevillea patches on the Antavibe Fokonany.”
- “Generate a map that includes only the 'Reboisement' and 'Grevillea' layers restricted to the Ambalona Fokontany region.”
- “List me the Fokontanys in the Sandrohy Commune.”
- "Show me a map of Grevillea plantations where the surface area is greater than 5000 m²."
| Layer | Technology |
|---|---|
| 🌐 Frontend | Streamlit |
| 🧠 Agent Framework | Google ADK |
| 🗺️ Geospatial | GeoPandas, Folium, Shapely, Fiona |
| 💾 Data | GeoJSON |
| 🔌 API | HTTP (Agent @ :8000) |
| 🐳 Runtime | Docker & Docker Compose |
| 🧰 Language | Python 3.12 |
The app is live and accessible online! 🚀
You can explore the interactive interface and test the LLM agent directly here:
👉 https://reforestai-agent-front-396062328299.europe-west9.run.app/
💡 The online version uses the same ADK Agent backend and geospatial datasets but may have limited export capabilities.
⭐ If you like this project, give it a star on GitHub! ⭐