The Problem
Organizations needing geospatial intelligence face barriers: building satellite analysis pipelines requires geospatial expertise, Sentinel-2 data management, and custom tooling. This repository provides a ready-made AI agent that lowers that barrier by accepting natural language queries about vegetation health, water bodies, or wildfire damage and returning rendered results.
What This Does
The repository contains four semi-independent projects. geo_agent/ (31 files, 20 code files) is the core: a Python agent using Strands Agents with Claude Sonnet 4.6 on Bedrock AgentCore Runtime, equipped with tools for Sentinel-2 analysis (NDVI, NDWI, NBR), OSM boundaries, and Amazon Location Service queries. react-ui/ (56 files) provides the TypeScript/React frontend with MapLibre GL, Cognito auth, and CloudFront distribution. frontend-cdk/ (19 files) and titiler-cdk/ (9 files) define the infrastructure as code for the tile server and UI deployment. Data flows from Sentinel-2 imagery through the agent’s analysis tools (defined in geo_agent/utils/tools.py, geo_agent/utils/sentinel_utils.py, geo_agent/utils/ndvi_utils.py) to the tile server, then to the React UI. The agent makes outbound network calls to S3 and AWS Location Service; tile rendering occurs in the CDK-deployed TiTiler stack.
How It Is Wired
Execution starts at geo_agent/awslabs/aws_location_server/server.py:769 (main), which reaches two internal functions. The most connected module is geo_agent/utils/tools.py (Ca=1, Ce=7, instability=0.88), defining 19 functions including bbox_around_point, create_bbox_from_coordinates, and download_geometry_from_s3 (called from 8 places). The call graph shows run_change_detection -> download_band x12 and run_change_detection -> _read_band x11 as the heaviest edges. geo_agent/utils/sentinel_utils.py (5 functions) handles Sentinel-2 collection search and raster clipping, making an outbound network call and reading/writing files. Downstream, geo_agent/utils/ndvi_utils.py (3 functions) calculates NDVI/NDWI/NBR stats. The CDK stacks (frontend-cdk/lib/geospatial-agent-stack.ts, titiler-cdk/) provision the ECS Fargate service, CloudFront, and tile endpoints. The reactor pattern: user query -> frontend Express server -> Bedrock AgentCore Runtime -> agent tool execution -> S3 data fetch -> TiTiler rendering -> map tile return to UI.
How To Use It
Setup: AWS CLI configured with permissions, Docker running, Node.js 20+, Python 3.10+, AWS CDK installed globally, AgentCore CLI (pip install bedrock-agentcore==1.1.2 bedrock-agentcore-starter-toolkit==0.3.0). Set shell variables from the README: export AWS_ACCOUNT=$(aws sts get-caller-identity --query Account --output text), export AWS_REGION=us-east-1, export S3_BUCKET_NAME=geospatial-agent-on-aws-${AWS_ACCOUNT}.
Deploy the geo agent: cd geo_agent && cp .env.example .env then python geo_agent/agentcore_utils/create_cdk_agent_role.py --agent-name geospatial-agent-on-aws --s3-bucket ${S3_BUCKET_NAME}. Configure environment values in .env (AWS_REGION, S3_BUCKET_NAME, AGENTCORE_ARN).
Deploy TiTiler and frontend: cd frontend-cdk && cdk deploy geospatial-agent-stack and cd titiler-cdk && cdk deploy. The README provides step-by-step CDK deployment commands for all three components, totaling ~15 minutes.
Run: After deployment, the frontend URL accepts natural language queries like "Show vegetation health for Central Park, New York".
Real-World Use
A disaster-response team needs to assess flood extent after a storm. They open the React UI, enter "Compare water levels for Folsom Lake, California 2021 vs 2022". The frontend forwards the query to the Bedrock AgentCore Runtime, which invokes the agent’s search_sentinel2_collection and get_filtered_images tools (defined in geo_agent/utils/sentinel_utils.py). The agent queries S3 for relevant Sentinel-2 granules, computes NDWI via geo_agent/utils/ndvi_utils.py, and the TiTiler stack renders a water-body map tile. The UI displays the interactive map with OSM boundary overlay. The team downloads the result or shares the link with stakeholders.
Code Health & Issues
The static analysis identified 26 findings across 6 kinds:
- [CRITICAL] Upgrade pinned dependency carrying a critical advisory:
pillow@11.3.0 CVE-2026-59198— the vulnerable code installs as pinned, reachable over the network without credentials. Fix: upgrade and commit lockfile. - [HIGH] Upgrade pinned dependencies with published advisories:
starlette@0.50.0 CVE-2026-54283,mcp@1.25.0 CVE-2026-52870,aws-cdk-lib@2.189.1 CVE-2026-11417,bedrock-agentcore@1.1.2 CVE-2026-16796, and 3 more. - [HIGH] No test suite: 51 source files, zero test files. Any change ships with no signal existing behavior holds.
- [HIGH] No CI configuration: 51 source files with no automated build/test gate.
- [HIGH] Build gate missing for deployment artifact
geo_agent/.bedrock_agentcore/geospatial_agent_on_aws/Dockerfile: image builds with no validated step. - [MEDIUM] Dependabot/Renovate not enabled: 5 manifest(s), no update bot configured.
- [MEDIUM] Container base image not pinned by digest:
public.ecr.aws/docker/library/python:3.12-slim— mutable base means build-to-build CVE drift with no record. - [MEDIUM] Large binaries in repository: 5 blobs over 5MB including
ndwi-2020-09-27.tif 19.0MB. - [MEDIUM] Outbound requests have no timeout: 1 call(s) with no timeout configured, risking worker hangs.
- [LOW] Missing convention files:
.editorconfig,.gitattributes, formatter config absent.
The Bottom Line
This repo delivers a functional, deployable geospatial AI agent with real Sentinel-2 data and a working React UI in about 15 minutes — a significant time-saving compared to building the stack from scratch. The codebase shows reasonable structure for a portfolio piece but carries production risk: critical and high-severity unpatched CVEs in pinned dependencies, no test or CI gate, oversized files with deep nesting, and mutable container bases. It is suitable for evaluation, prototyping, or internal tooling where the dependency and operational risks can be mitigated, but not yet for unsupervised production use without the recommended upgrades, test additions, and pipeline gates.