Skip to content

About

Submission for Agent Academy Hackathon, May 2026 πŸš€

Topics

Resources

Code of conduct

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

Repository files navigation

masthead

Agent Academy Hackathon

Agent Academy Hackathon: Calamity Agent Weather & Fire Alerts

Project Goal

Disasters disrupt thousands of lives every year, leaving behind lasting effects on people and property... You and your family can take simple steps now to prepare for emergencies. By doing so, you take back controlβ€”even in the uncertainty of disaster.

Source: FEMA. Are You Ready? An In-Depth Guide to Citizen Preparedness, Publication P-2064, September 2020

June 1 is the start of the Atlantic hurricane season, but there are many different types of disasters and hazards. Our risk of becoming affected depends on the possibility of these events and our vulnerability to them.

One way of reducing our exposure to risk is access to up-to-date information. Using Microsoft Copilot Studio, I developed Calamity Agent to:

Author

😸 Andy Merhaut (GitHub: @tagr)

Project Video

πŸ“Ί CALAMITY AGENT - Agent Academy Hackathon

Samples

Figure 1

Figure 1. Adaptive card prompts for user location

Figure 2

Figure 2. Current NWS flash flood warnings for the selected location

Figure 3

Figure 3. Inline map of the hazardous area

Figure 4

Figure 4. Full-size map. Geometry provided by NWS, map generated by Azure Maps

Figure 5

Figure 5. Fire hazard from VIIRS NOAA-21 data

Figure 6

Figure 6. VIIRS wildfire data analysis

Figure 7

Figure 7. Wildfire safety recommendations

System Architecture

architecture
graph TB
    subgraph User["πŸ‘€ User Interface"]
        U[("πŸ§‘ User")]
    end

    subgraph CopilotStudio["πŸ€– Microsoft Copilot Studio"]
        CA["🧠 Calamity Agent\n(Claude Sonnet 4.6)"]
        DOCS["πŸ“š Knowledge Base\n(FEMA / Ready.gov PDFs)"]
        CA --> DOCS
    end

    subgraph Azure["☁️ Azure Container Apps"]
        MCP["πŸ”Œ MCP Server\n(Node.js / Express)"]
        API["βš™οΈ Calamity API\n(.NET Aspire / ASP.NET Core)"]
        MCP -->|HTTP REST| API
    end

    subgraph ExternalAPIs["🌐 External APIs"]
        NWS["β›ˆοΈ National Weather Service\napi.weather.gov"]
        NASA["πŸ”₯ NASA FIRMS\nfirms.modaps.eosdis.nasa.gov"]
        MAPS["πŸ—ΊοΈ Azure Maps\natlas.microsoft.com"]
    end

    U <-->|"πŸ’¬ Chat"| CA
    CA <-->|"MCP / Streamable HTTP"| MCP
    API -->|"Alerts & Zone Data"| NWS
    API -->|"VIIRS Fire Detections"| NASA
    API -->|"Geocoding & Static Maps"| MAPS

    classDef userStyle fill:#6d28d9,stroke:#4c1d95,color:#fff
    classDef agentStyle fill:#1d4ed8,stroke:#1e3a8a,color:#fff
    classDef docsStyle fill:#2563eb,stroke:#1e3a8a,color:#fff
    classDef mcpStyle fill:#0e7490,stroke:#164e63,color:#fff
    classDef apiStyle fill:#0f766e,stroke:#134e4a,color:#fff
    classDef nwsStyle fill:#1e40af,stroke:#1e3a8a,color:#fff
    classDef nasaStyle fill:#b45309,stroke:#78350f,color:#fff
    classDef mapsStyle fill:#0369a1,stroke:#0c4a6e,color:#fff

    class U userStyle
    class CA agentStyle
    class DOCS docsStyle
    class MCP mcpStyle
    class API apiStyle
    class NWS nwsStyle
    class NASA nasaStyle
    class MAPS mapsStyle
Loading

Data Flow

sequenceDiagram
    actor User as πŸ§‘ User
    participant CA as 🧠 Calamity Agent<br/>(Copilot Studio)
    participant MCP as πŸ”Œ MCP Server<br/>(Node.js)
    participant API as βš™οΈ Calamity API<br/>(.NET)
    participant NWS as β›ˆοΈ NWS API
    participant NASA as πŸ”₯ NASA FIRMS
    participant MAPS as πŸ—ΊοΈ Azure Maps

    User->>CA: "What alerts are near Seattle?"

    rect rgb(30, 64, 175)
        CA->>MCP: geocode("Seattle, WA")
        MCP->>API: GET /geocode?query=Seattle%2C+WA
        API->>MAPS: GET /geocode (Azure Maps)
        MAPS-->>API: [lat, lon]
        API-->>MCP: [lat, lon]
        MCP-->>CA: lat: 47.60, lon: -122.33
    end

    rect rgb(14, 116, 144)
        CA->>MCP: get-alerts(lat, lon)
        MCP->>API: GET /nws/zone?lat=47.60&lon=-122.33
        API->>NWS: GET /points/{lat},{lon}
        NWS-->>API: zone IDs (forecast / county / fire)
        API->>NWS: GET /alerts/active/zone/{zoneId} (Γ—3, parallel)
        NWS-->>API: active alert headlines & descriptions
        API-->>MCP: JSON alert payload
        MCP-->>CA: formatted alert text
    end

    rect rgb(15, 118, 110)
        CA->>MCP: alert-map(lat, lon)
        MCP-->>CA: Azure Maps static image URL
    end

    CA-->>User: Alert summary + map image URL

    opt πŸ”₯ Fire query
        rect rgb(180, 83, 9)
            CA->>MCP: get-viirs-fires(lat, lon)
            MCP->>API: GET /fires/viirs?lat=...&lon=...
            API->>NASA: GET /api/area/csv/{key}/VIIRS_NOAA21_NRT/{bbox}/{days}
            NASA-->>API: CSV fire detections
            API-->>MCP: JSON fire detection records
            MCP-->>CA: structured VIIRS fire data
        end

        rect rgb(180, 83, 9)
            CA->>MCP: alert-fire(lat, lon)
            MCP->>API: GET /map/static?overlay=fire
            API->>NASA: GET /api/area/csv/{key}/VIIRS_NOAA21_NRT/{bbox}/{days}
            NASA-->>API: CSV fire detections
            API->>MAPS: GET /map/static (with fire overlays)
            MAPS-->>API: PNG image bytes
            API-->>MCP: Azure Maps static image URL
            MCP-->>CA: fire map URL
        end

        CA-->>User: Fire detection data + map
    end
Loading

Technologies by Project

βš™οΈ /CalamityCopilotService.Api β€” Aspire Web API

  • πŸ”· .NET 10 / ASP.NET Core Minimal APIs
  • πŸš€ .NET Aspire β€” service defaults, OpenTelemetry, health checks
  • πŸ“„ Microsoft.AspNetCore.OpenApi β€” OpenAPI / Swagger
  • πŸ—ΊοΈ Azure Maps β€” geocoding and static map image rendering
  • β›ˆοΈ National Weather Service REST API β€” zone lookups, active alert queries
  • πŸ”₯ NASA FIRMS VIIRS NOAA-21 NRT API β€” near real-time fire detection data (CSV)
  • πŸ“ Ramer-Douglas-Peucker polygon simplification (built-in) for NWS zone rendering

πŸš€ /CalamityCopilotService.AppHost β€” Aspire App Host

  • πŸ”· .NET 10 / .NET Aspire hosting model
  • πŸŽ›οΈ Orchestrates local development and Azure deployment of the API project
  • ☁️ Azure Developer CLI (azd) β€” cloud provisioning and container deployment

πŸ”Œ /MCP β€” MCP Server

  • 🟒 Node.js / πŸ”· TypeScript
  • ⚑ Express 5 β€” HTTP server
  • 🀝 @modelcontextprotocol/sdk β€” MCP Streamable HTTP transport
  • βœ… Zod β€” input schema validation for MCP tools
  • πŸ› οΈ Exposes five tools to Copilot Studio: geocode, get-alerts, alert-map, alert-fire, get-viirs-fires
  • ☁️ Deployed as an Azure Container App

πŸ€– /CopilotStudio/Calamity Agent β€” Copilot Studio Agent

  • πŸ—οΈ Microsoft Copilot Studio β€” declarative YAML / .mcs.yml format
  • 🧠 Claude Sonnet 4.6 β€” underlying generative model
  • πŸ”Œ MCP connector (ca_CalamityMCP2) β€” connects the agent to the MCP Server via Streamable HTTP
  • πŸ“š Knowledge base β€” FEMA and Ready.gov preparedness PDFs for grounding responses
  • πŸ’¬ Topics: greeting, current conditions, conversation lifecycle, fallback handling
  • πŸ“ Variables: UserLocation, location for session state

Prerequisites

Tool Purpose Min Version
πŸ”· .NET SDK Build and run the Aspire API 10.0
🟒 Node.js Build and run the MCP server 22 LTS
🐳 Docker Desktop Container runtime for Aspire local dev latest
☁️ Azure Developer CLI (azd) Provision and deploy to Azure Container Apps 1.x
πŸ”‘ Azure subscription Host the container apps and Azure Maps β€”
πŸ—ΊοΈ Azure Maps account Geocoding and static map rendering β€”
πŸ”₯ NASA FIRMS API key VIIRS fire detection data β€”
πŸ€– Microsoft Copilot Studio license Deploy and run the Calamity Agent β€”
πŸͺ£ Azure Blob Storage account (Optional) Host static map image assets served to the agent β€”

Setup

1. πŸ”· Calamity API

Configure secrets for Azure Maps and NASA FIRMS. The recommended approach is .NET user secrets so keys are never committed:

cd CalamityCopilotService.Api
dotnet user-secrets set "AzureMaps:Key" "<your-azure-maps-key>"
dotnet user-secrets set "NasaFirms:ApiKey" "<your-nasa-firms-key>"

Run locally via .NET Aspire (launches the API + Aspire dashboard):

cd CalamityCopilotService.AppHost
dotnet run

The Aspire dashboard opens at https://localhost:17191. The API is available at the URL shown in the dashboard for the calamitycopilotservice-api resource.

2. πŸ”Œ MCP Server

Install dependencies and build:

cd MCP
npm install
npm run build

Create a .env file in MCP/ with the URL of your running API (local or deployed):

CALAMITY_API_BASE_URL=http://localhost:<port-from-aspire-dashboard>

Start the server:

npm start

The MCP server listens on http://localhost:3000/mcp by default. Set the PORT environment variable to override.

3. ☁️ Deploy to Azure

Both the API and MCP server are deployed as Azure Container Apps using the Azure Developer CLI from the repository root:

azd auth login
azd up

azd up provisions all Azure resources defined in azure.yaml (resource group, container registry, container apps) and deploys both services. After deployment, update MCP/.env with the deployed API URL shown in the azd up output, then redeploy the MCP server.

4. πŸ€– Configure the Copilot Studio Agent

  1. Open Copilot Studio and import the solution from CopilotStudio/Calamity Agent/.
  2. Open the CalamityMCP2 connector and update the MCP server URL to point to your deployed Azure Container App endpoint.
  3. Publish the agent.

Acknowledgements

Special Thanks

US-NationalWeatherService-Logo svg

nasa_logo_white

Additional Resources

Media

  1. Original: National Oceanic and Atmospheric Administration Vector: Clindberg, Public domain, via Wikimedia Commons
  2. Original: National Aeronautics and Space Administration Image: Public Domain, via NASA FIRMS

About

Submission for Agent Academy Hackathon, May 2026 πŸš€

Topics

Resources

Code of conduct

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages