Skip to content

About

๐Ÿ† United Hacks V6 Winner โ€” Multi-agent app for emergency dispatch assistance with speech recognition and interactive visualization

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

FirstWaveAI - Emergency Dispatch Assistant


๐ŸŽฅ Demo

Demo Video

๐Ÿ† Devpost

View on Devpost


๐Ÿ’ก Inspiration

๐Ÿ“ž Over 240 million emergency calls are made in the United States each year (National Emergency Number Association), putting extreme pressure on dispatchers in life-or-death situations. In those critical first moments, key details can be missed, delayed, or misunderstood when callers are panicking.

FirstWaveAI was built to rethink the emergency intake process. I created an AI-powered call assistant that speaks directly with callers, asks clarifying questions, and structures critical information in real time. The system then visualizes the situation on a live map, identifies nearby resources, and generates an AI-assisted dispatch recommendation, all while keeping a human dispatcher in full control with an approval override. ๐Ÿš‘


๐Ÿšจ What it does

FirstWaveAI is a real-time emergency dispatch assistant that combines speech recognition, multi-agent AI, and interactive visualization to help dispatchers work faster and more accurately.


๐Ÿš€ Key Features

๐ŸŽ™๏ธ Voice-First Interface

Callers speak naturally using the Web Speech API, while the system transcribes the conversation in real time and keeps a full transcript.

๐Ÿง  Multi-Agent AI Pipeline

Six specialized agents, orchestrated with LangGraph, work together to analyze the call:

  • Extraction Agent โ€“ Captures key details (location, injuries, hazards, people count)
  • Triage Agent โ€“ Assigns priority levels (P1โ€“P4)
  • Next-Question Agent โ€“ Suggests clarifying follow-ups
  • Dispatch Planner โ€“ Recommends EMS, Fire, or Police
  • Resource Locator โ€“ Finds nearest available units with ETAs
  • Safety Guardrail โ€“ Ensures ethical recommendations

๐Ÿ–ฅ๏ธ Interactive Dashboard

A three-column interface shows:

  • Live chat transcript
  • AI-generated emergency summary
  • Dispatch recommendations with approve/cancel controls

๐Ÿ—บ๏ธ Resource Mapping

An interactive Leaflet map displays nearby hospitals, fire stations, police, and pharmacies with distances and travel times.


๐Ÿ› ๏ธ Tech Stack

Backend

  • Python 3.12 with FastAPI and Uvicorn
  • LangGraph โ€“ Multi-agent workflow orchestration
  • Groq (openai/gpt-oss-120b) โ€“ LLM inference
  • Fish Audio API โ€“ Text-to-speech
  • Server-Sent Events (SSE) โ€“ Real-time streaming updates
  • boto3 โ€“ Reads API keys from AWS SSM Parameter Store

Frontend

  • Next.js 16 (App Router) with React 19 and TypeScript
  • Tailwind CSS 4 and shadcn/ui
  • Leaflet + OpenStreetMap โ€“ Interactive mapping
  • Web Speech API โ€“ Speech recognition and transcription

Infrastructure

  • Docker / Docker Compose โ€“ Runs the backend, frontend, and LocalStack together
  • LocalStack โ€“ Local AWS emulation (S3, DynamoDB, IAM, Lambda, SSM, EC2, CloudWatch Logs)
  • Terraform โ€“ Infrastructure as code, split into compute, iam, networking, and storage modules, with remote state in S3
  • GitHub Actions โ€“ Terraform format, validate, and plan checks against LocalStack on every PR

๐ŸŽฎ Quick Start

Prerequisites

  • Docker with Docker Compose
  • Terraform 1.x
  • LocalStack auth token โ€“ free account at app.localstack.cloud
  • Groq API key โ€“ free at console.groq.com
  • Fish Audio API key โ€“ optional, for text-to-speech

1. Clone the repository

git clone https://github.com/darrensh3n/FirstWaveAI.git
cd FirstWaveAI

2. Configure environment files

# Root .env: LocalStack auth token (gitignored)
echo "LOCALSTACK_AUTH_TOKEN=your-localstack-token" > .env

# backend/.env is loaded by Docker Compose and must exist
cp backend/.env.example backend/.env

# API keys, which Terraform writes into SSM Parameter Store
cp infra/terraform.tfvars.example infra/terraform.tfvars
# Edit infra/terraform.tfvars and set groq_api_key (Fish Audio values are optional)

3. Start LocalStack

docker compose up -d localstack

4. Provision infrastructure

# One-time: create the S3 bucket that holds Terraform state
cd infra-bootstrap
terraform init
terraform apply

# Create the app's resources, including the SSM parameters the backend reads
cd ../infra
terraform init
terraform apply
cd ..

5. Start the app

docker compose up -d --build
Service URL
Frontend http://localhost:3000
Backend http://localhost:8000
LocalStack http://localhost:4566

View logs with docker compose logs -f and stop everything with docker compose down.


๐Ÿ”ฌ Use Cases

This platform serves multiple emergency response applications:

  • Emergency Call Triage: Real-time analysis and prioritization of emergency calls
  • Dispatcher Assistance: AI-powered support for human dispatchers
  • Resource Optimization: Intelligent matching of emergencies with nearby resources
  • Response Time Improvement: Faster information extraction and dispatch recommendations

๐Ÿ“„ License

This project is licensed under the MIT License.

About

๐Ÿ† United Hacks V6 Winner โ€” Multi-agent app for emergency dispatch assistance with speech recognition and interactive visualization

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages