Skip to content

satvika-eda/EcoGuardian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒฟ EcoGuardian: Multi-Agent Environmental Health Intelligence

AI-powered environmental and health intelligence built using Googleโ€™s ADK.


๐ŸŒ Problem Statement

Over 150 million Americans live in regions with poor air quality โ€” yet daily health decisions still rely on fragmented tools:

  • Weather apps show temperature but not health implications
  • AQI apps show pollution but not symptoms
  • Health sites offer generic advice without environmental context
  • Users often check 4โ€“5 different apps daily

Why Existing Solutions Fall Short

  • Provide raw data, not intelligence
  • No correlation between environment โ†’ symptoms โ†’ outbreaks
  • No medical triage contextualized to environmental triggers

๐Ÿ’ก Solution Overview

EcoGuardian is an AI-driven, multi-agent environmental health intelligence platform built with Google ADK.

๐Ÿš€ Value Proposition

  • 30ร— faster than manually checking multiple apps
  • Unified analysis across air, weather, pollen, UV, symptoms, outbreaks
  • Smart routing โ†’ only the required agents are triggered
  • Real-time outbreak intelligence (WHO, CDC, GDELT)
  • Safety-first medical triage with mandatory disclaimers

๐Ÿ—๏ธ Architecture

architecture

Execution Flow

EF-1

EF-2

Agent Hierarchy

๐Ÿง  Root Coordinator (LlmAgent)

  • Routes queries to proper agents
  • Maintains {city: str} in session state
  • Synthesizes multi-agent responses

๐ŸŒŽ Environmental Intelligence Agents

  • Air Quality Agent (OpenAQ)
  • Weather Agent (Open-Meteo)
  • Pollen Agent (Pollen.com)
  • UV Index Agent (Open-Meteo AQ)

๐Ÿฅ Health Intelligence Pipeline

Stage 1 โ€“ Parallel Execution

  • Symptom Analyzer
  • Outbreak Monitor

Stage 2 โ€“ Sequential

  • Hospital Locator

Stage 3 โ€“ Decision Coordinator

  • Merges intel into actionable guidance

Events Agent

  • Uses google_search tool for environmental/sustainability events

Application Deployment URL :

https://ecoguardian-mqvs64cf3q-uc.a.run.app/


โœจ Features

๐ŸŒค Environmental Monitoring

  • Real-time AQI + PM2.5, PM10, Oโ‚ƒ, NOโ‚‚
  • Temperature, humidity, wind, precipitation
  • Pollen levels (tree/grass/weed)
  • UV index + risk analysis

๐Ÿฅ Health Intelligence

  • Disease outbreak detection (WHO, CDC, GDELT)
  • Symptom-based urgency classification (NOT diagnosis)
  • Nearest hospitals with distance + emergency flagging
  • Built-in medical safety guardrails

๐Ÿง‘โ€๐Ÿ’ป User Experience

  • Streamlit UI
  • Persistent session storage (SQLite)
  • Conversation memory
  • Multi-agent orchestration (10 agents)

๐Ÿš€ Installation

1. Clone repository

git clone https://github.com/satvika-eda/EcoGuardian.git
cd EcoGuardian

2. Create virtual environment

python -m venv .venv
source .venv/bin/activate    

3. Install dependencies

pip install -r requirements.txt

4. Add environment variables

Add GOOGLE_API_KEY and OPENAQ_API_KEY


โš™๏ธ Configuration

Required

GOOGLE_API_KEY=your_key
OPENAQ_API_KEY=your_key

Free APIs used:

  • Google Gemini API
  • OpenAQ Air Quality API
  • Open-Meteo Weather & UV API
  • Pollen.com API (unofficial)
  • WHO + CDC + GDELT outbreak data
  • OpenStreetMap Overpass API

๐ŸŽฎ Usage

Run the app

streamlit run app.py

Example Queries

  • "How's the environment in Miami today?"
  • "I have fever and cough for 8 days in Miami."
  • "Find nearest hospitals."
  • "What sustainability events are happening this weekend?"

๐Ÿ”ง Technical Details

Tech Stack

Component Technology
Framework Google ADK
LLM Gemini 2.5 Flash Lite
UI Streamlit
Database SQLite
Memory InMemoryMemoryService
Orchestration LlmAgent, SequentialAgent, ParallelAgent
APIs OpenAQ, Open-Meteo, Pollen.com, WHO, CDC, GDELT, OSM

Orchestration Patterns

  • Independent agents
  • Sequential pipelines
  • Parallel execution
  • Hybrid routing
  • Agents wrapped as tools (AgentTool)

๐ŸŒ API Integrations

๐Ÿ”ต Air Quality โ€” OpenAQ

โ˜๏ธ Weather โ€” Open-Meteo

๐ŸŒพ Pollen โ€” Pollen.com

๐ŸŒž UV Index โ€” Open-Meteo (Air Quality API)

๐Ÿฆ  Outbreaks โ€” WHO, CDC, GDELT, outbreak.info

๐Ÿฅ Hospitals โ€” OpenStreetMap Overpass API

Each API is accessed via an ADK Tool() or AgentTool().


๐ŸŽ“ ADK Concepts Implemented

  • Multi-Agent System (10 agents total)
  • SequentialAgent (3-stage medical pipeline)
  • ParallelAgent (symptoms + outbreaks)
  • AgentTool wrappers
  • Session persistence (SQLite via DatabaseSessionService)
  • Memory (InMemoryMemoryService)
  • State management (StateSchema: {city: str})
  • Observability (LoggingPlugin)
  • Retry logic for API failures
  • Medical safety guardrails
  • Evaluation Suite
  • Agent Deployment

๐Ÿฅ Safety & Ethics

โ— System NEVER:

  • Diagnoses medical conditions
  • Recommends treatments
  • Provides prescriptions
  • Replaces doctors

โœ… System ALWAYS:

  • Adds medical disclaimers
  • Flags emergencies
  • Encourages professional care
  • Avoids PHI storage
  • Uses anonymous session IDs only

๐Ÿš€ Future Enhancements

Product Features

  • Integrate Google Maps to the UI for better user experience.
  • Add more agents for other environmental and health factors

Technical Improvements

  • Caching
  • A2A protocol (Agent-to-Agent)
  • Monitoring dashboard (Grafana + Prometheus)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages