Skip to content
Live remote-sensing pipeline · advisory only

The water you can actually monitor.

AquaLens pulls recent Sentinel-2 imagery, computes six water-quality indices, fuses optional field evidence, and writes a grounded risk brief — so the field team knows where to sample first.

aqualens · session 8599f3 · 49.239°N · 16.510°ESample

Risk

Medium · 0.46

Routine urgency

NDCI+0.122
NDVI shore+0.326
MNDWI-0.174
NDTI-0.048
“Given the conflicting spectral signals and the indication of elevated chlorophyll-a, we recommend a follow-up investigation — potentially including in-situ sampling — to clarify the water body's conditions and confirm any algal activity.”

Spectral indices

Six band-math views of the same scene.

Each index isolates a different water-quality signal. AquaLens computes them on the same Sentinel-2 acquisition and aggregates over the water mask.

Normalized Difference Water Index

NDWI

formula · (NIR − SWIR) / (NIR + SWIR)

Tells us where water actually is in the scene.

How it works

Two pipelines. One session trace.

The deterministic numeric core runs first and produces the auditable numbers. The Gemini agent layer wraps it: agents choose inputs and write prose, but they can't move the risk band. Every decision lands in the per-session trace.

Deterministic coreGemini agent

Pipeline 1 · deterministic core

Source of truth for the numbers
  1. Step 01

    Pick an area

    search, paste coordinates, or tap the map

    AquaLens turns the chosen point into a ~1 km buffer polygon and records a date window. A water-mask check classifies the AOI as water, mixed, or land.

  2. Step 02

    Fetch Sentinel-2 imagery

    Microsoft Planetary Computer · STAC query

    The backend searches the Sentinel-2 L2A archive for the freshest scene that intersects the AOI under the cloud-cover ceiling, signs the COG asset URLs, and reads only the bands it needs.

  3. Step 03

    Compute spectral indices

    deterministic numpy + audit-friendly weights

    Six band-math indices (NDWI · MNDWI · NDTI · NDCI · NDVI · WRI) are computed over the water mask, with full provenance for every value.

  4. Step 04

    Score the risk

    weighted, unit-tested, reproducible

    A deterministic weighted model turns the index aggregates into a 0–100 score, a level (low / medium / high), and an urgency tier. The agent layer is never allowed to move these numbers.

Pipeline 2 · Gemini agent layer

Agents choose inputs & write prose
  1. Agent 1

    Gemini

    Coordinator · plans the workflow

    Gemini thinking mode

    Reads the AOI plus its history and decides per-agent budgets. Always schedules Scout, Analyst, and Reporter; schedules Historian only when prior sessions exist.

  2. Agent 2

    Gemini

    Scout · picks the satellite scene

    Function calling + Gemini Vision

    Evaluates candidate scenes and asks Gemini Vision to look at the actual RGB thumbnail. If haze sits over the AOI it re-queries with a tighter cloud bound.

  3. Agent 3

    Gemini

    Historian · pulls trends and grounded context

    History + Search grounding + memory

    Pulls prior sessions, runs a Mann-Kendall significance test in Gemini's Python sandbox, cites real local news via Google Search grounding + URL Context, and writes a distilled note back to per-water-body memory for next time.

  4. Agent 4

    Gemini

    Analyst · writes and self-critiques the brief

    Structured output + critique loop

    Drafts recommendation + reasoning + limitations against the deterministic numbers. A separate Gemini call critiques the draft against the hard rules; the Analyst rewrites once if anything fails. Both drafts land in the trace.

  5. Agent 5

    Gemini

    Reporter · writes the citizen summary

    Structured response schema

    Turns the deterministic numbers plus Scout / Historian / Analyst outputs into the public-facing card: likely-safe · use caution · avoid, guidance for adults and for pets and kids, explicit limitations, and citations when grounded context exists. Falls back to a deterministic summary if the Gemini call fails.

Every agent run is captured in the Agentic workflow card on the session page. If any agent fails the orchestrator records the failure and falls back to a deterministic path, so a session always produces a usable brief.

Agent surface

Five Gemini agents. One audited workflow.

The deterministic numeric core is wrapped by a small graph of specialist agents. Each one has a focused job, a constrained tool surface, and a structured-output contract — and every call is captured in a per-session trace.

Agent 1

Coordinator · plans the workflow

Gemini thinking mode

Reads the AOI plus its history and decides which specialists to invoke and what their tool / time budgets are. Always schedules Scout, Analyst, and Reporter for water AOIs; schedules Historian when prior sessions exist. Failed plan? The orchestrator falls back to a baseline schedule so the session still completes.

Agent 2

Scout · picks the satellite scene

Function calling + multimodal vision

Calls Planetary Computer for Sentinel-2 candidates, then asks Gemini Vision to look at the actual RGB thumbnail. If haze sits over the AOI it re-queries with a tighter cloud bound.

Tools

  • list_recent_scenes
  • inspect_scene
  • look_at_thumbnail

Agent 3

Historian · pulls trends and grounded context

Code execution + Search grounding + memory

Pulls prior sessions, runs a Mann-Kendall significance test in Gemini's Python sandbox, cites real news via Google Search grounding + URL Context, and writes a distilled note back to per-water-body memory for next time.

Tools

  • get_session_history
  • compute_trend
  • semantic_recall_notes

Agent 4

Analyst · writes and self-critiques the brief

Structured output + critique loop

Drafts recommendation + reasoning + limitations against the deterministic numbers. A separate Gemini call critiques the draft against the hard rules; the Analyst rewrites once if anything fails. Both drafts land in the trace.

Tools

  • draft_call
  • critique_call
  • rewrite_call

Agent 5

Reporter · writes the citizen summary

Structured response schema

Turns Scout / Historian / Analyst outputs plus the deterministic risk numbers into the public-facing card: tone (likely-safe / use caution / avoid), guidance for adults and for pets and kids, explicit limitations, and citations when grounded context exists. Falls back to a deterministic citizen summary if the Gemini call fails.

Tools

  • call_structured
  • tone_guardrail
  • citation_filter

agent_traces

JSONB log per session

Every tool call, argument, result, error, and token count — surfaced live in the Agentic workflow card.

agent_memory

vectors per water body

text-embedding-004 vectors with a pgvector(768) HNSW cosine index. Next session for the same lake recalls semantically related notes.

Gemini capabilities exercised end-to-end

  • function calling
  • multimodal vision
  • Google Search grounding
  • URL Context
  • code execution
  • thinking mode
  • structured output
  • long context
  • text-embedding-004

Built on open data and free infrastructure

ESA CopernicusUSGS LandsatMicrosoft Planetary ComputerOpenStreetMapOpenFreeMapMapLibre GLSentinel-2 L2AGoogle AI StudioESA CopernicusUSGS LandsatMicrosoft Planetary ComputerOpenStreetMapOpenFreeMapMapLibre GLSentinel-2 L2AGoogle AI Studio

Ready when you are

Point AquaLens at any lake on Earth and watch the pipeline run.

Drawing the polygon takes ten seconds. The first scene, indices, and risk brief land less than a minute later — no account required.