Skip to content
ย 
ย 

Latest commit

ย 

History

12 Commits

Folders and files

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

Repository files navigation

title RoadGuardian AI
emoji ๐Ÿš‘
colorFrom red
colorTo black
sdk docker
app_port 7860

๐Ÿš‘ RoadGuardian AI

Autonomous Emergency Intelligence for Inclusive Road Safety

RoadGuardian AI Banner

Hackathon Status AI RAG Backend Frontend License

RoadGuardian AI is an AI-native emergency intelligence infrastructure platform designed for underserved and accessibility-critical regions.

An offline-first, multi-agent emergency coordination system that combines realtime AI orchestration, RAG-powered medical guidance, MCP-based dispatch infrastructure, accessibility-first UX, and hazard intelligence into a unified emergency response platform.


๐ŸŽฅ Demo Preview

๐ŸŽฌ Demo Video: Coming Soon

๐Ÿ“ธ Mission Control Dashboard Preview

[ Dashboard Screenshot Placeholder ]

๐Ÿ“ธ SOS Emergency Activation

[ SOS Flow Screenshot Placeholder ]

๐Ÿ“ธ Realtime Multi-Agent Orchestration

[ Orchestration Screenshot Placeholder ]

๐ŸŒ Why RoadGuardian AI Matters

Road accidents kill over 300,000 people annually across BIMSTEC countries and injure millions more. Most preventable deaths occur because victims do not receive help during the golden hour โ€” the first 60 minutes after a crash when survival chances decrease sharply with every passing minute.

Current emergency systems fail because they assume:

  • stable internet connectivity
  • able-bodied users
  • voice-based communication
  • urban infrastructure access

But the people who most urgently need emergency support are often:

  • rural residents
  • specially abled users
  • unconscious crash victims
  • cross-border travelers
  • people with limited connectivity

RoadGuardian AI was built specifically for them.


๐Ÿšจ Problem Statement

Five critical infrastructure failures drive emergency response failures across underserved regions:

  1. Bystanders freeze during emergencies because existing apps provide little actionable real-time guidance.

  2. Emergency systems depend on stable internet connectivity, which is unavailable on many rural highways and mountain roads.

  3. Current emergency platforms exclude specially abled users such as deaf, visually impaired, speech-impaired, and elderly individuals.

  4. Language barriers prevent tourists and cross-border travelers from communicating with responders during emergencies.

  5. No widely accessible emergency system autonomously coordinates rescue workflows when victims are unconscious or unable to communicate.

The result is devastating:

The people who most urgently need emergency help are the people current emergency systems fail completely.


๐Ÿ’ก Solution Overview

RoadGuardian AI provides a realtime multi-agent emergency orchestration platform capable of:

  • ๐Ÿง  AI-powered emergency triage
  • ๐Ÿ“ก Realtime orchestration streaming
  • ๐Ÿ“š RAG-based first-aid guidance
  • ๐Ÿ›ฐ๏ธ MCP-enabled dispatch coordination
  • ๐ŸŒ Offline-first emergency support
  • โ™ฟ Accessibility-native emergency UX
  • ๐Ÿ›ฃ๏ธ AI-powered hazard detection
  • ๐Ÿ—บ๏ธ Live emergency intelligence mapping

When an SOS is triggered, multiple AI agents activate in parallel to coordinate emergency workflows autonomously.


โœจ Key Features

Feature Description
๐Ÿง  Multi-Agent Orchestrator Coordinates emergency workflows in realtime
๐Ÿ“š RAG Emergency Guidance Retrieves contextual first-aid instructions
๐Ÿ“ก WebSocket Streaming Streams live orchestration events
๐Ÿš‘ MCP Dispatch System Coordinates emergency tools & responders
๐ŸŒ Offline Emergency Support Works in low-connectivity environments
โ™ฟ Accessibility Modes Supports specially abled users
๐Ÿ›ฃ๏ธ Hazard Detection Detects potholes & road hazards
๐Ÿ—บ๏ธ Mission Control Dashboard Live AI emergency visualization
โšก Parallel Agent Execution Multiple AI agents operate simultaneously
๐Ÿ”„ Realtime Emergency Timeline Tracks orchestration lifecycle live

๐Ÿง  Why This Is NOT Just Another Emergency App

Unlike traditional emergency apps, RoadGuardian AI combines:

  • Multi-agent AI orchestration
  • Realtime infrastructure streaming
  • Offline-first emergency workflows
  • Accessibility-native UX
  • RAG-powered medical intelligence
  • MCP-based dispatch coordination
  • Emergency infrastructure simulation

This project is designed as:

AI-native emergency infrastructure, not a chatbot.


๐Ÿ—๏ธ System Architecture

High-Level Architecture

USER
 โ†“
SOS ACTIVATION
 โ†“
ORCHESTRATOR AGENT
 โ”œโ”€โ”€ TRIAGE AGENT
 โ”œโ”€โ”€ GUIDANCE AGENT
 โ”œโ”€โ”€ LOCATE AGENT
 โ”œโ”€โ”€ DISPATCH AGENT
 โ””โ”€โ”€ HAZARD DETECTION AGENT
 โ†“
RAG + MCP + VECTOR DATABASE
 โ†“
WEBSOCKET STREAMING
 โ†“
MISSION CONTROL DASHBOARD

Realtime Orchestration Lifecycle

SOS Trigger
 โ†“
Orchestrator Activation
 โ†“
Parallel Agent Execution
 โ”œโ”€โ”€ Triage
 โ”œโ”€โ”€ Guidance
 โ”œโ”€โ”€ Locate
 โ””โ”€โ”€ Dispatch
 โ†“
RAG Retrieval
 โ†“
MCP Tool Invocation
 โ†“
Streaming Emergency Guidance
 โ†“
Emergency Resolution

RAG Pipeline

Emergency Query
      โ†“
Semantic Chunking
      โ†“
Embedding Generation
      โ†“
ChromaDB Vector Search
      โ†“
Confidence Ranking
      โ†“
Context Injection
      โ†“
LLM Guidance Generation
      โ†“
Realtime Streaming Response

๐Ÿค– AI Architecture

RoadGuardian AI uses a realtime multi-agent orchestration system built using:

  • LangGraph StateGraph
  • FastAPI async orchestration
  • ChromaDB vector retrieval
  • SentenceTransformers embeddings
  • WebSocket event streaming
  • Groq-hosted Llama inference
  • MCP emergency tooling

The system is designed to feel like:

An AI-native emergency operations infrastructure platform.


๐Ÿงฉ Multi-Agent System

Agent Responsibility
๐Ÿง  Orchestrator Agent Coordinates emergency workflows
๐Ÿš‘ Triage Agent Analyzes emergency severity
๐Ÿ“š Guidance Agent Retrieves medical guidance via RAG
๐Ÿ“ Locate Agent Finds nearby hospitals/responders
๐Ÿšจ Dispatch Agent Executes MCP dispatch workflows
๐Ÿ›ฃ๏ธ Hazard Detection Agent Detects dangerous road conditions

๐Ÿ“š RAG Pipeline

The Retrieval-Augmented Generation (RAG) system enables realtime emergency medical guidance using verified emergency datasets.

Features

  • Semantic chunking
  • Embedding generation
  • Vector search
  • Confidence scoring
  • Streaming citations
  • Emergency-focused retrieval prompts

Data Sources

  • WHO emergency guidelines
  • Red Cross first-aid protocols
  • Trauma response documentation

Vector Database

  • ChromaDB

Embedding Model

  • sentence-transformers/all-MiniLM-L6-v2

๐Ÿ”Œ MCP Infrastructure

RoadGuardian AI uses MCP-style emergency tooling for structured orchestration.

MCP Tools

notify_family()
find_hospital()
dispatch_emergency()
create_hazard_report()

These tools integrate directly into the LangGraph orchestration lifecycle and stream structured events to the frontend Mission Control Dashboard.


โ™ฟ Accessibility Innovation

RoadGuardian AI was designed with accessibility as a core infrastructure requirement.

Accessibility Features

  • High contrast mode
  • Dyslexia-friendly typography
  • Large emergency controls
  • Voice guidance UI
  • Vibration-based emergency interaction
  • Reduced motion mode
  • Offline emergency fallback
  • Panic-state optimized UX

This is one of the strongest differentiators of the platform.


๐ŸŒ Offline-First Emergency Infrastructure

RoadGuardian AI is built for:

  • rural highways
  • low-connectivity environments
  • mountain roads
  • underserved regions

The system supports:

  • offline emergency workflows
  • cached emergency guidance
  • websocket reconnection
  • progressive web app behavior

๐Ÿ› ๏ธ Tech Stack

Frontend

Technology Purpose
React + Vite Frontend framework
TailwindCSS UI styling
Framer Motion Realtime animations
Zustand State management
Leaflet.js Live maps
Workbox PWA support

Backend

Technology Purpose
FastAPI Backend APIs
LangGraph Multi-agent orchestration
WebSockets Realtime streaming
LangChain RAG workflows

AI Infrastructure

Technology Purpose
Groq + Llama 3.1 AI inference
ChromaDB Vector database
SentenceTransformers Embeddings
YOLOv8 Hazard detection

Deployment

Platform Usage
Railway Backend hosting
Vercel Frontend hosting
Supabase Database & storage

Deploy Frontend to Vercel

  1. Click the Vercel deployment link: https://vercel.com/new?teamSlug=shakera-projects
  2. Import the zahid-frontend directory.
  3. Set environment variables:
    • VITE_API_URL โ†’ Your backend URL (e.g., Railway deployment URL)
    • VITE_WS_URL โ†’ Your backend WebSocket URL (e.g., wss://<your-backend>.railway.app/stream)
  4. Deploy. Use the generated preview URL as the hackathon demo link.

๐Ÿ“‚ Repository Structure

roadguardian-ai/
โ”œโ”€โ”€ zahid-frontend/
โ”œโ”€โ”€ ema-backend/
โ”œโ”€โ”€ shared-contracts/
โ””โ”€โ”€ docs/

Why This Structure?

  • Independent frontend/backend development
  • Merge-safe architecture
  • Shared websocket contracts
  • Parallel hackathon development

โš™๏ธ Installation & Setup

Backend Setup

cd ema-backend

python -m venv venv

source venv/bin/activate

pip install -r requirements.txt

python rag/ingest/seed_rag.py

uvicorn main:app --reload

Frontend Setup

cd zahid-frontend

npm install

npm run dev

๐Ÿ” Environment Variables

Backend .env

GROQ_API_KEY=your_api_key_here
CHROMA_DB_PATH=./chroma_db

Frontend .env.local

VITE_API_URL=http://localhost:8000
VITE_WS_URL=ws://localhost:8000/stream

๐Ÿš€ Running the Project

Step 1 โ€” Start Backend

uvicorn main:app --reload

Step 2 โ€” Start Frontend

npm run dev

Step 3 โ€” Verify WebSocket Connection

Open:

http://localhost:5173

Verify:

  • websocket connects
  • Mission Control activates
  • realtime events stream

๐ŸŽฌ Demo Flow

Scenario:

A deaf motorcyclist crashes on a rural highway with unstable internet connectivity.

RoadGuardian AI:

  1. Activates SOS automatically
  2. Launches realtime AI orchestration
  3. Streams emergency guidance
  4. Retrieves first-aid protocols
  5. Coordinates dispatch workflows
  6. Detects nearby hazards
  7. Continues operating offline
  8. Provides accessibility-safe emergency interaction

๐Ÿ“ก API Documentation

POST /sos

{
  "user_id": "user_001",
  "emergency_type": "accident",
  "location": {
    "lat": 23.91,
    "lng": 90.21
  }
}

POST /hazard-detect

{
  "image": "base64_image"
}

WebSocket /stream

Streams realtime orchestration events.


๐Ÿ“จ Example WebSocket Events

agent_activated

{
  "event": "agent_activated",
  "agent": "triage",
  "status": "running",
  "message": "Analyzing trauma severity"
}

rag_chunk_stream

{
  "event": "rag_chunk_stream",
  "agent": "guidance",
  "status": "streaming",
  "message": "Apply pressure to the wound..."
}

โœ… Current Implementation Status

Backend

  • FastAPI backend
  • LangGraph orchestration
  • WebSocket streaming
  • ChromaDB retrieval
  • MCP tooling
  • Parallel agents
  • Token monitoring
  • Schema validation

Frontend

  • Final Mission Control integration
  • Accessibility polish
  • Full realtime visualization
  • PWA optimization

๐Ÿ† CloudCamp Innovation Highlights

RoadGuardian AI combines:

  • Multi-agent orchestration
  • Accessibility-first AI
  • Offline emergency intelligence
  • Realtime infrastructure streaming
  • RAG-powered emergency guidance
  • MCP-based dispatch coordination

into a single emergency coordination platform.


๐Ÿ”ฎ Future Roadmap

  • Real hospital integrations
  • Offline local LLMs
  • Multilingual expansion
  • Automatic crash detection
  • Municipal hazard intelligence
  • Smart traffic emergency analytics

๐Ÿ‘ฅ Team

Member Role
Zahid Hasan Frontend & UX
Shakera Ema Backend & AI Infrastructure
Mehrab Shakib Researcher, Planner

๐Ÿ“œ License

MIT License


๐Ÿ™ Acknowledgements

  • WHO
  • Red Cross
  • OpenStreetMap
  • LangGraph
  • LangChain
  • ChromaDB
  • Open-source AI ecosystem

๐ŸŒŸ Final Vision

RoadGuardian AI aims to become:

A realtime AI-native emergency intelligence infrastructure layer for underserved and accessibility-critical regions.

Built for:

  • rural communities
  • specially abled users
  • low-connectivity environments
  • emergency-critical situations

Designed not just to respond to emergencies โ€” but to coordinate intelligent rescue infrastructure itself.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages