AmberAI

Real-time wildfire intelligence and tactical response platform powered by multi-agent AI.

AmberAI combines satellite fire detection, weather forecasting, terrain analysis, and a coordinated team of AI agents to predict wildfire behavior, optimize firefighter deployment, and automate civilian evacuation — all rendered on an interactive tactical map.


Inspiration

The devastating wildfire seasons across the western United States have exposed a critical gap in emergency response: incident commanders are forced to synthesize information from dozens of disconnected data sources — satellite imagery, weather forecasts, terrain maps, road conditions — under extreme time pressure, often with lives on the line. A single fire can generate hundreds of data points that change by the hour, and the human cost of delayed or uninformed decisions is measured in acres burned and communities lost.

We asked ourselves: what if an AI system could do what a room full of analysts does — pull in satellite feeds, weather data, topography, population maps, and water sources — and synthesize it all into an actionable fire behavior prediction in minutes instead of hours? What if firefighters could see not just where a fire is, but where it will be in 6, 12, and 24 hours, with optimal station routes and evacuation alerts setup and mapped out?

That's Amber — an AI-powered incident command system that turns raw data into tactical intelligence.

What it does

AmberAI is a full-stack wildfire monitoring and response platform with four core capabilities:

Real-Time Fire Monitoring Dashboard

  • Ingests satellite hotspot data from NASA FIRMS (4 sensors: VIIRS SNPP, NOAA-20, NOAA-21, MODIS), active fire perimeters from NIFC WFIGS, and incident reports from InciWeb — all refreshed every 10 minutes via background workers
  • Renders everything on a dark-themed MapLibre GL tactical map with confidence-colored hotspot markers, fire perimeter polygons, and incident points
  • Provides instant weather intelligence, terrain analysis, and nearby weather station observations for any fire on the map

Multi-Agent AI Fire Analysis

  • A coordinated team of 5 specialized Claude AI agents analyze a fire in parallel: Wind Analysis, Fuel/Weather, Topography, Water/Hydrology, and Community Risk
  • A Supervisor agent synthesizes all 5 specialist outputs into a unified fire behavior prediction with spread forecasts at 6, 12, and 24 hours
  • Results stream to the browser in real-time via Server-Sent Events (SSE), progressively rendering predicted perimeters, terrain hazards, firebreaks, communities at risk, and evacuation zones on the map as the analysis unfolds
  • A Deployment agent then recommends tactical positioning for fire crews based on the analysis and computed station routes

Firefighter Routing & Tactical Operations

  • Calculates optimal driving routes from the 5 closest fire stations to the fire perimeter using OpenRouteService
  • Flags routes that pass dangerously close to active fire (within 1 mile)
  • Firefighters can mark road obstacles directly on the map, triggering AI-assisted rerouting that avoids blocked roads while considering fire spread patterns
  • Contextual map layers show water sources, fire hydrants, staging areas, and vegetation from OpenStreetMap

Civilian Evacuation System

  • Civilians can register their address for evacuation alerts — no login required
  • When an incident commander launches an evacuation, AmberAI uses the AI-predicted 24-hour fire perimeter as a geofence, performs point-in-polygon matching against registered civilian locations, and sends targeted email and SMS alerts via Gmail and Twilio
  • Each notification includes a one-click unsubscribe token

How we built it

Backend Architecture

  • Django serves as the application server with 35+ REST API endpoints handling everything from fire data aggregation to AI analysis orchestration
  • 18 service modules each wrap an external API with caching, rate limiting, and data normalization (firms.py, nifc.py, weather.py, nws.py, elevation.py, terrain.py, overpass.py, routing.py, etc.)
  • Redis powers both the caching layer (with intelligent TTLs from 5 minutes for weather to 24 hours for elevation data) and the Celery task broker
  • Celery Beat runs 4 background tasks on 10-15 minute intervals to keep fire data fresh without blocking user requests
  • SQLite stores 11 models covering fire snapshots, AI analyses, evacuation zones, civilian registrations, and notification delivery logs

AI Multi-Agent System

  • Built on Anthropic's Claude API (Sonnet 4) with a custom multi-agent architecture
  • ThreadPoolExecutor spawns 5 specialist agents simultaneously, each analyzing a different domain (wind, fuel, terrain, water, community risk), in total analyzing over a thousand geospatial data points.
  • A supervisor agent receives all 5 outputs and synthesizes them into a structured prediction with confidence levels
  • The analysis pipeline collects intelligence from 8 data sources in parallel (weather, hourly forecast, terrain, stations, communities, nearby fires, water, fire stations) before feeding the agents
  • Map layers (predicted perimeters, hazards, firebreaks, communities, evacuation zones) are generated programmatically from the AI's structured JSON output

Frontend

  • MapLibre GL JS renders 14+ interactive map layers with GeoJSON sources, confidence-based styling, click handlers, and progressive layer addition during analysis
  • The SSE streaming consumer processes 8 event types (intel, routes, agents, supervisor, analysis, evacuation, deployment, complete), updating both the map and sidebar panels in real-time
  • Vanilla JavaScript — no framework overhead, just direct DOM manipulation and fetch calls

Data Pipeline

  • Fire data flows: External APIs -> Django services (with caching) -> GeoJSON normalization -> Redis cache -> Frontend map layers
  • Analysis flow: 8 parallel intel fetches -> 5 parallel AI agents -> supervisor synthesis -> map layer generation -> SSE streaming -> progressive rendering
  • Background flow: Celery Beat -> refresh tasks -> Redis cache update -> frontend periodic refresh (2-min interval) picks up new data

Challenges we ran into

Rate Limiting Across Multiple APIs The Overpass API (OpenStreetMap) aggressively rate-limits at ~2 requests per second, and OpenRouteService caps at 40 requests per minute. During the analysis pipeline, we're hitting both simultaneously while also fetching from NWS, Open-Meteo, and FIRMS. We built a centralized rate-limiting system using Redis timestamps with minimum gap enforcement (1.5s for ORS, 2s for Overpass) and exponential backoff on 429 responses (3s, 6s, 12s, 24s). Getting this right was critical — without it, the parallel intel collection stage would trigger cascading failures.

Orchestrating 5 AI Agents in Parallel Running 5 Claude API calls simultaneously and handling partial failures gracefully was harder than expected. If one agent times out or returns malformed JSON, the supervisor still needs to produce a useful synthesis. We implemented a fallback path: if fewer than 2 agents succeed, the system drops to a single-agent analysis using a comprehensive prompt. Parsing the structured JSON responses from each agent required careful prompt engineering to ensure consistent output formats across all 5 specialists.

SSE Streaming with Progressive Map Rendering Django's StreamingHttpResponse doesn't natively support SSE formatting, so we built a custom generator that yields properly formatted event: and data: lines. On the frontend, we had to manage the complexity of adding map layers progressively — each SSE event potentially adds new GeoJSON sources and layers to MapLibre, and these have to be added in the right order to avoid z-index conflicts and missing source references. Getting the evacuation zone polygons to render correctly over the predicted perimeters required careful layer ordering.

Geospatial Computation Without PostGIS We chose SQLite for simplicity, which meant no PostGIS for spatial queries. Point-in-polygon testing for evacuation geofencing, perimeter centroid computation, and bbox filtering all had to be implemented in pure Python. The terrain analysis service samples 50+ grid points across a fire perimeter and batch-fetches elevations, then computes slopes, aspects, and ridgeline detection — all without a spatial database engine.

Accomplishments that we're proud of

The multi-agent AI system actually works. Five specialist agents analyzing different aspects of a wildfire in parallel, feeding into a supervisor that synthesizes a coherent prediction — it produces genuinely useful fire behavior forecasts with spread direction, rate estimates, and community risk assessments. The structured output reliably generates map-renderable GeoJSON for predicted perimeters, hazard zones, and evacuation areas.

Real-time progressive rendering. Watching the analysis unfold on the map is genuinely compelling — station routes appear first, then predicted perimeters fade in at 6h/12h/24h, terrain hazards and firebreaks populate, communities at risk light up, and evacuation zones materialize. The SSE streaming makes the ~30-second analysis feel interactive rather than like a loading screen.

End-to-end evacuation pipeline. From a civilian typing their address on a public page, to an AI predicting where the fire will be in 24 hours, to a point-in-polygon geofence match, to an actual email landing in their inbox with an unsubscribe link — the full pipeline works. It connects the AI prediction directly to a life-safety action.

Aggregating 10+ external data sources into a coherent tactical picture. NASA satellites, NIFC fire perimeters, InciWeb incidents, NWS weather and alerts, Open-Meteo elevation, OpenStreetMap water/vegetation/infrastructure, OpenRouteService routing, Census population data, and Claude AI analysis — all normalized into GeoJSON and rendered on a single map with consistent styling and interactivity.

The caching architecture. Intelligent TTLs (5 min for weather, 15 min for fire data, 12 hr for OSM features, 24 hr for elevation) combined with Celery Beat background refresh means the dashboard feels instant while staying current. Rate limiters prevent API bans without sacrificing data freshness.

What we learned

Multi-agent AI systems need careful failure handling. The happy path where all 5 agents return perfect JSON is straightforward — the real engineering is in graceful degradation. What happens when the wind agent times out? When the terrain agent returns unparseable output? We learned to design agent systems with explicit fallback paths and minimum-viable synthesis thresholds.

Prompt engineering for structured output is an art. Getting Claude to consistently return valid JSON with specific keys, numeric ranges, and geographic coordinates required iterating on system prompts extensively. Small changes in prompt wording could cause an agent to nest its JSON differently or omit critical fields. Temperature 0.3 was the sweet spot — creative enough for analysis, deterministic enough for parseable output.

SSE is underrated for AI applications. Instead of making users stare at a spinner for 30 seconds, streaming intermediate results creates a much better experience. The insight is that AI analysis pipelines have natural stage boundaries (intel collection, agent analysis, synthesis, layer generation) that map perfectly to SSE events.

Geospatial data is messy. InciWeb reports coordinates in DMS (degrees-minutes-seconds) format with inconsistent negative signs. NIFC returns ArcGIS-specific geometry formats. Overpass returns nodes, ways, and relations that all need different GeoJSON conversion. We spent significant time on data normalization that isn't visible in the final product but is essential to making everything render correctly on the map.

Redis is the glue. Using Redis as both cache, message broker, and rate limiter simplified our architecture enormously. Every external API call checks Redis first, every Celery task communicates through Redis, and every rate limit is enforced via Redis timestamps. A single infrastructure dependency that handles three concerns.

What's next for AmberAI

Real-time satellite integration — Instead of polling FIRMS every 10 minutes, integrate with GOES-16/17 geostationary satellite feeds for near-continuous hotspot monitoring with sub-5-minute latency.

Historical fire behavior learning — Train the AI agents on historical wildfire progression data (CAL FIRE, MTBS) so predictions are grounded in real-world fire behavior patterns rather than pure reasoning from current conditions.

Mobile-first field interface — Build a lightweight mobile app for firefighters in the field with offline map caching, obstacle reporting via GPS, and push notification alerts when the AI detects a significant change in fire behavior or route safety.

Multi-fire coordination — Extend the analysis to handle resource allocation across multiple simultaneous fires, optimizing which stations respond to which incidents based on proximity, crew availability, and fire severity rankings.

Integration with CAD/dispatch systems — Connect to existing Computer-Aided Dispatch systems used by fire departments so AmberAI's routing recommendations and evacuation triggers feed directly into operational workflows rather than existing as a parallel tool.

Predictive evacuation timing — Use the AI's fire progression model to calculate not just where to evacuate, but when — giving civilians time-specific guidance ("you have approximately 4 hours before fire reaches your area") rather than binary alerts.

Built With

Share this project:

Updates