DEV Community

Husky
Husky

Posted on

From Satellite Pixels to Field Action: Building HabiWatch with Google Antigravity

How I used Google Antigravity to build an autonomous habitat-intelligence system that turns fragmented environmental evidence into monitored, field-ready action.

Hackathon disclosure: I created this article for the purposes of entering the All Things Agentic Hackathon, hosted by Google and Devpost.

Scientists and conservation teams rarely lack data. The harder problem is turning scattered data into a decision.

A habitat investigation might require satellite imagery, weather stations, regional climate records, species observations, wildfire detections, wetland inventories, and hydrology measurements. Each source has different formats, spatial coverage, update schedules, and scientific limitations. Someone still has to find the evidence, check whether it is comparable, calculate the change, document the reasoning, and decide whether a field team should investigate.

I built HabiWatch to remove that friction.

With HabiWatch, a scientist draws a U.S. study area of up to 150 square miles, asks one habitat question, and starts a research run. The system gathers public environmental evidence, runs deterministic analysis, checks the scientific claim, produces a reproducible evidence package, and continues monitoring the area after the initial investigation.

What the live experience looks like

The public HabiWatch landing page running on Google Cloud Run, with a looping product walkthrough

The public Cloud Run deployment. The landing page gives judges an immediate demo path and a short looping walkthrough of the research-to-action workflow.

After opening the workspace, the scientist can search for a habitat, enter coordinates, or move directly to a location such as Reelfoot Lake at 36.3889, -89.3889. They can draw a circle or polygon, ask a question, and follow the research agents in real time.

The HabiWatch research workspace with Google Maps, study-area controls, monitoring, charts, and the live workflow

The interface deliberately keeps the map at the center. This is not a chatbot with a map attached. The selected geometry controls which evidence can be acquired, which raster windows are processed, what area the metrics describe, and what coordinates can appear in a field-inspection task.

How Google Antigravity changed the way I built it

I used Google Antigravity as the agentic development workspace for HabiWatch.

The useful shift was moving from “help me write this function” to “complete and verify this bounded product task.” I could describe an outcome—such as adding polygon selection, implementing a monitoring policy, or proving an end-to-end workflow—and let the development agent work across the editor, terminal, and browser.

My build loop looked like this:

  1. Define the outcome and constraints. I specified the expected user experience, scientific boundary, API contract, and test behavior before implementation.
  2. Let the agent plan across the full stack. Antigravity helped trace how a change affected React state, FastAPI contracts, persistence, background workers, and the browser experience.
  3. Review artifacts instead of trusting activity. Screenshots, test results, architecture diagrams, and browser traces made it possible to check the outcome without treating a long stream of tool calls as proof.
  4. Correct the design with concrete feedback. If a sidebar moved, a map interaction felt wrong, or a workflow step lacked evidence, I could point at the visible result and iterate.
  5. Verify before accepting the change. Backend tests, frontend tests, production builds, and Playwright journeys became part of the task—not a cleanup step at the end.

Antigravity accelerated development, but it is important to separate the development environment from the deployed agent runtime. HabiWatch does not require Antigravity to serve users. The production application uses Google ADK, the Google GenAI SDK, Gemini models, and Google Cloud services. Antigravity helped me design, implement, inspect, and verify that system.

The agent architecture

HabiWatch autonomous agent flow from question to continuous monitoring

The workflow uses models where judgment is useful and deterministic functions where repeatability matters.

1. Gemini interprets the research objective

The Gemini Research Planner interprets the scientist's question, dates, variables, and intended outcome. It returns a structured decision rather than free-form instructions.

The model does not receive unlimited authority. A deterministic research-policy router chooses registered datasets, preserves the exact user geometry, selects allowed analysis operations, and keeps causal claims disabled.

2. Evidence is acquired in parallel

HabiWatch can run up to three evidence connectors concurrently:

  • Climate and hydrology from sources such as NOAA, NASA, and USGS.
  • Ecology and disturbance evidence from GBIF, NASA FIRMS, and the National Wetlands Inventory.
  • Sentinel-2 Level-2A satellite imagery for vegetation measurements.

Each branch records its source, status, duration, and preserved artifact. All branches join in stable dataset order before validation and harmonization begin. Required-source failures remain visible instead of being hidden by a polished final answer.

3. Science stays deterministic

Gemini does not estimate vegetation health by looking at a map screenshot.

HabiWatch reads public Sentinel-2 multispectral imagery through the keyless Earth Search STAC API and calculates:

NDVI = (NIR - Red) / (NIR + Red)
NDMI = (NIR - SWIR1) / (NIR + SWIR1)
Enter fullscreen mode Exit fullscreen mode

The current composite is compared with a five-year same-season baseline. Cloud and invalid pixels are masked, cross-tile scenes are mosaicked, and the result is clipped to the selected geometry. If scene count or valid coverage is insufficient, the system reports insufficient evidence instead of inventing a confident conclusion.

The same separation applies to statistical trends, threshold comparisons, checksums, and monitoring cadence. Models can interpret those outputs, but they cannot rewrite them.

4. Review and audit are separate jobs

The Gemini Scientific Reviewer receives the deterministic metrics, source disagreements, warnings, and proposed finding. It can approve reporting, reduce confidence, add constraints, or withhold a weak finding.

An independent Gemma Evidence Auditor then checks unsupported claims and privacy boundaries. Gemma receives a sanitized digest and has no tools, coordinates, filesystem access, or notification capability.

This separation matters. The planner does not grade itself, the scientific reviewer does not change measurements, and the auditor cannot perform the action it is auditing.

5. The trajectory is evaluated, not only the final answer

A convincing paragraph does not prove that an autonomous workflow behaved correctly.

Every completed HabiWatch run generates a 12-check machine-readable evaluation report covering:

  • Response contract.
  • Workflow trajectory.
  • Grounding and reproducibility.
  • Security and action-policy boundaries.

The Evidence Package shows model decisions separately from deterministic functions, parallel branches, joins, and policy gates. It also records prompt versions, SHA-256 hashes, and the timeline event IDs supporting each check.

Evaluation failure never deletes the scientific result. It creates a visible warning.

From a research result to continuous action

The workflow does not end when a chart appears.

After a validated run, the scientist can choose which indicators to monitor, set a daily-to-quarterly cadence, adjust thresholds and trigger directions, and decide whether external notifications or AI-generated incident audio are allowed.

When new evidence arrives:

  1. A deterministic comparison checks every selected threshold.
  2. The Scientific Reviewer verifies whether the change is supportable.
  3. The Operational Action Agent proposes bounded, non-destructive field steps.
  4. Gemma audits the proposed external dispatch.
  5. HabiWatch creates an incident and action packet.
  6. An authorized webhook is attempted only if the policy and Gemma gate allow it.
  7. The next scheduled check re-enters the same loop.

If Gemma blocks dispatch, the incident and evidence still remain visible. Notification delivery fails closed without erasing the underlying observation.

A concrete example: Reelfoot Lake

Imagine a wetland scientist asking:

Is vegetation stress increasing around Reelfoot Lake, and where should a field team inspect first?

The scientist draws the study area once. HabiWatch can then retrieve vegetation, climate, species, wildfire, wetland, and hydrology evidence; compare current vegetation with its seasonal baseline; expose source disagreements; and produce a prioritized field-inspection task if a validated monitoring threshold is crossed.

That is the operational value: less time assembling files and more time deciding where limited field capacity should go.

Google AI models have distinct roles

Model HabiWatch responsibility
Gemini 3.5 Flash Fast research planning and structured evidence routing
Gemini 3.6 Flash Scientific review and bounded operational decisions
Gemma 4 Independent evidence and dispatch auditing
Veo 3.1 Optional illustrative field briefing—not scientific evidence
Lyria 3 Clip Opt-in instrumental incident pulse—not scientific evidence

The model manifest stored with each run records the actual model identifiers, invocation status, timestamps, hashes, and generated artifact IDs. I do not count a configured model as a successful integration until the deployed application has invoked it and preserved proof.

Deployment architecture

HabiWatch production architecture on Google Cloud

The hackathon deployment uses direct Google-managed Cloud Run URLs and scales services to zero when idle:

  • React and Google Maps frontend on Cloud Run.
  • FastAPI service on Cloud Run.
  • Private workflow and media workers on Cloud Run.
  • Pub/Sub for durable workflow and media delivery.
  • Firestore for accounts, runs, monitoring policies, incidents, and job state.
  • Cloud Storage for evidence packages, rasters, evaluation reports, and generated media.
  • Cloud Scheduler for recurring monitoring.
  • Secret Manager for backend credentials.

I intentionally did not add a load balancer, Cloud Armor, or Cloud SQL to a judge-scale deployment that does not need them. Architectural discipline also means refusing infrastructure that adds cost and complexity without improving the current use case.

What was hardest

Keeping the product autonomous without making it unaccountable

It is easy to draw a box labeled “agent” around a sequence of API calls. It is harder to make every decision, retry, artifact, and authority boundary inspectable. Durable state and the workflow-proof report made the autonomous path easier to trust.

Treating satellite imagery as scientific input

Google Maps provides the smooth basemap, but HabiWatch does not analyze its tiles. Scientific measurements come from independently acquired Sentinel-2 bands with explicit processing parameters and provenance.

Designing for partial failure

An unavailable media model should not invalidate a vegetation result. A failed webhook should not erase an incident. An evaluation warning should not delete validated science. Separating these failure domains made the project substantially more robust.

Making the browser part of verification

Antigravity's editor-terminal-browser workflow was especially useful here. A component test can say a button exists while the actual button is hidden behind a navigation bar. Browser-level verification caught issues that code inspection alone did not.

What I learned

  • Agentic utility comes from completing the background workflow, not merely answering the first question.
  • Deterministic science and model judgment work better together than either does alone.
  • Multi-agent systems are justified when roles have genuinely different authority, tools, and failure policies.
  • Evaluating the execution trajectory reveals failures that final-answer grading misses.
  • A map becomes operational when its geometry controls evidence, calculations, monitoring, and field tasks.
  • Development agents are most useful when the human sets boundaries and reviews tangible artifacts.

Try HabiWatch

To try the workflow, deploy HabiWatch using the repository instructions, choose Open judge demo, and run the Reelfoot Lake investigation.

You can also inspect the complete implementation and reproducible setup in the public GitHub repository.

If you are building for the All Things Agentic Hackathon, my biggest recommendation is simple: show the autonomous work, show the failure boundaries, and show the evidence that proves the system actually ran.


This public article was created specifically for the purposes of entering HabiWatch in the All Things Agentic Hackathon.

Top comments (0)