Project Info
This project did not submit a demo video on Devpost.
Inspiration
Lifeline AI was inspired by a simple but urgent problem: during disasters, the people who need help the most are often hidden inside scattered information. Emergency alerts, news updates, social media posts, community reports, and voice calls all contain valuable signals, but they are usually fragmented and difficult to process quickly. In a crisis, every minute matters. A post saying “need oxygen,” a call saying “my grandmother is trapped,” and an alert about rising floodwater may all point to the same high-risk situation. We wanted to build a system that could help responders connect those dots faster. Our goal was to create an AI-powered emergency intelligence platform that helps emergency teams, hospitals, shelters, NGOs, and local communities understand where help is needed most urgently. What Lifeline AI Does Lifeline AI collects crisis signals from multiple sources and transforms them into structured emergency incidents. The system can take information from alerts, web sources, community posts, and voice reports, then organize it into a clear response workflow. The core idea is: fragmented crisis signals → structured incidents → related incident clusters → priority scores → actionable recommendations Instead of showing responders hundreds of disconnected reports, Lifeline AI groups related information and ranks incidents by urgency. For example, if multiple reports mention flooding, a trapped person, and an oxygen need near the same location, the system can merge those signals into one high-priority incident cluster. How We Built It We built Lifeline AI as a multi-agent system with a backend, frontend dashboard, memory layer, and incident-processing pipeline. The backend was built using FastAPI. We created endpoints to process incoming crisis reports, retrieve incident clusters, and generate a priority queue. Each incoming report is converted into a structured incident with fields such as event type, location, urgency, medical need, confidence, and source. We designed the system around several key components: Data ingestion agents for collecting crisis signals from alerts, web reports, social/community inputs, and voice calls using browserbase and deepgram APIs ASI:One / orchestration logic to coordinate the workflow and reason over incoming reports. Incident extraction to convert raw text into structured emergency data. Incident fusion logic to decide whether multiple reports refer to the same event. Redis memory to store incident clusters and retrieve past context. Priority scoring to rank incidents based on urgency, medical need, vulnerability, and repeated confirmation. Responder dashboard to show the most urgent incidents and recommended actions. The fusion logic checks multiple signals before merging reports: [ \text{Fusion Score} = w_1(\text{semantic similarity}) + w_2(\text{location distance}) + w_3(\text{time closeness}) + w_4(\text{event type match}) ] This helped us represent the real-world idea that two reports should only be merged if they are similar in meaning, close in location, close in time, and describe the same type of emergency. What We Learned We learned that the most important part of disaster AI is not just collecting information, but making it usable. A dashboard full of raw reports can still overwhelm responders. The real value comes from clustering, prioritization, and clear recommendations. We also learned how important reliability and explainability are in emergency systems. A system like this cannot simply output an answer; it must show why an incident was prioritized. For that reason, we focused on making the priority score understandable through factors like medical need, trapped people, rising water, and multiple related reports. Another key learning was that building with multiple agents requires clean data structures. Once we created a shared incident schema, it became much easier to connect different parts of the system together. Challenges We Faced One of the biggest challenges was deciding the right scope for a hackathon. Disaster response is a large and complex problem, so we focused on building a working slice of the system: report intake, incident extraction, clustering, priority scoring, Redis memory, and a dashboard. We also faced technical challenges connecting the backend, frontend, and Redis memory layer. Import paths, package setup, and local development issues took time to debug. Another challenge was designing the fusion logic in a way that was simple enough to implement quickly but still meaningful enough to demonstrate real impact. A major product challenge was keeping the system understandable. We wanted judges and users to immediately understand what Lifeline AI does, so we simplified the demo around one clear story: scattered crisis reports enter the system, Lifeline AI organizes them, and responders receive a prioritized action plan. Impact Lifeline AI can help several groups during disasters: Emergency responders can identify urgent rescue and medical cases faster. Emergency operations centers can use it as a live intelligence dashboard. NGOs and shelters can understand where supplies and support are needed. Hospitals and medical teams can detect urgent needs like oxygen, insulin, dialysis, or elderly care. Local communities can report emergencies through accessible text or voice inputs. By reducing confusion, grouping duplicate reports, and prioritizing urgent cases, Lifeline AI can help responders allocate limited resources more effectively. Conclusion Lifeline AI is our attempt to use AI for a real human problem: helping people get support faster when disasters strike. We built it as a multi-agent emergency intelligence platform that turns fragmented crisis information into structured incidents, clustered reports, priority scores, and actionable recommendations.
🚨 Lifeline AI - Crisis Management Platform
Powered 100% by Fetch.ai's ASI:One API - Intelligent emergency response with semantic clustering, geocoding, and AI-powered recommendations.
🎯 What is Lifeline AI?
A multi-agent emergency intelligence platform that transforms crisis reports into actionable insights:
- 📊 Semantic Clustering - Groups related incidents using AI embeddings
- 🗺️ Map Visualization - Interactive geographic view of all incidents
- 🎨 Color-Coded Categories - 6 distinct event types for quick identification
- 🤖 AI Recommendations - Context-aware emergency response plans
- 📍 Geocoding - Automatic location coordinate resolution
- ⚡ Real-time Updates - Auto-refresh every 10 seconds
🌟 Key Features
1. Intelligent Clustering
- Uses ASI:One embeddings for semantic similarity (not just keyword matching)
- Combines text similarity (70% threshold) + geographic proximity (5km radius)
- Automatically groups related incidents across different locations
2. Visual Dashboard
- Priority Queue: Ranked by urgency and impact
- Map View: Interactive Leaflet map with color-coded markers
- Clusters Tab: Category-based organization (Medical, Rescue, Environmental, etc.)
3. AI-Powered Insights
- ASI:One Chat API generates intelligent recommendations
- Context-aware action plans for emergency responders
- Fallback to rule-based logic if API unavailable
4. Color-Coded Categories
- 🔴 Medical Emergency - Oxygen, insulin, critical care
- 🟠 Rescue Request - Trapped, stuck, immediate help needed
- 🔵 Flooding - Water rising, flood warnings
- 🟡 Power Outage - Electrical infrastructure issues
- 🟢 Shelter Update - Housing, evacuation centers
- 🟣 General Alert - Other crisis situations
🚀 Quick Start
Prerequisites
- Python 3.9+
- Node.js 18+
- Redis server
- ASI:One API key (already configured!)
Installation
1. Clone and setup backend:
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
2. Start Redis:
redis-server
3. Run backend:
uvicorn main:app --reload --port 8000
4. Setup frontend:
cd frontend
npm install
npm run dev
5. Open browser:
http://localhost:5173
📖 Usage
Submit a Crisis Report
- Enter emergency description (e.g., "Grandmother needs oxygen, water rising")
- Add location (e.g., "Berkeley, CA")
- Click "Process Event"
View Results
- Priority Queue: See ranked incidents by urgency
- Map View: Visualize incidents geographically
- Clusters: Browse by category (Medical, Rescue, etc.)
Example Reports
Text: "My grandmother is trapped and needs oxygen urgently"
Location: "Oakland, CA"
→ Creates Medical Emergency cluster (Red)
Text: "Flooding on Main Street, multiple people stuck"
Location: "Berkeley, CA"
→ Creates Flooding cluster (Blue)
Text: "Power outage affecting hospital backup systems"
Location: "San Francisco, CA"
→ Creates Power Outage cluster (Yellow)
🏗️ Architecture
┌─────────────────────────────────────────┐
│ Frontend (React + Leaflet) │
│ - Priority Queue - Map View - Clusters│
└──────────────────┬──────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ FastAPI Backend │
│ - Event Processing - Clustering │
└──────────────────┬──────────────────────┘
│
┌──────────┴──────────┐
▼ ▼
┌───────────────┐ ┌────────────────┐
│ ASI:One API │ │ Redis Cache │
│ - Embeddings │ │ - Clusters │
│ - Chat/Recs │ │ - Incidents │
└───────────────┘ └────────────────┘
🔑 ASI:One Integration
Single API Powers Everything!
Embeddings (asi1-embedding):
- Converts incident text to vector embeddings
- Enables semantic similarity comparison
- Powers intelligent clustering
Chat Completions (asi1-mini):
- Generates context-aware recommendations
- Analyzes cluster severity and urgency
- Provides actionable response plans
No OpenAI Required! 🎉
See ASI_ONE_INTEGRATION.md for detailed API usage.
📁 Project Structure
lifeline-ai/
├── backend/
│ ├── main.py # FastAPI app
│ ├── schemas.py # Data models
│ ├── asi_client.py # ASI:One chat API
│ ├── agents/
│ │ ├── asi_coordinator.py # Event processing
│ │ └── resource_agent.py # Resource finding
│ ├── processing/
│ │ ├── incident_extractor.py # Text analysis + geocoding
│ │ ├── incident_fusion.py # Semantic clustering
│ │ ├── semantic_clustering.py # ASI:One embeddings
│ │ ├── geocoding.py # Location → lat/lng
│ │ ├── priority_scorer.py # Urgency calculation
│ │ └── recommendation_engine.py # AI recommendations
│ ├── memory/
│ │ ├── incident_memory.py # Redis operations
│ │ └── redis_client.py # Redis connection
│ └── browser/
│ └── browserbase_search.py # Resource search
├── frontend/
│ ├── src/
│ │ ├── App.tsx # Main app + tabs
│ │ ├── components/
│ │ │ ├── EventInput.tsx # Report submission
│ │ │ ├── PriorityQueue.tsx # Ranked list
│ │ │ ├── ClusterMap.tsx # Interactive map
│ │ │ └── ClustersView.tsx # Category view
│ │ └── App.css # Styling
│ └── package.json
└── docs/
├── SETUP.md # Installation guide
├── IMPROVEMENTS_SUMMARY.md # What's new
└── ASI_ONE_INTEGRATION.md # API details
🎨 Screenshots
Priority Queue
Color-coded clusters ranked by urgency with AI recommendations
Map View
Interactive Leaflet map showing all incidents geographically
Clusters Tab
Organized by category: Medical, Rescue, Environmental, Infrastructure, Shelter, General
📊 Performance
- Clustering: ~1-2s per incident (ASI:One API)
- Geocoding: ~0.5-1s per location (Nominatim)
- Map Rendering: Optimized for 100+ incidents
- Auto-refresh: Every 10 seconds
- Fallback: Instant keyword-based clustering if API unavailable
🛠️ API Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /events/process | Submit new crisis report |
GET | /priority-queue | Get sorted clusters by priority |
GET | /clusters | Get all clusters (unsorted) |
DELETE | /memory | Clear all clusters from Redis |
🧪 Testing
Test Semantic Clustering
# Submit similar incidents
curl -X POST http://localhost:8000/events/process \
-H "Content-Type: application/json" \
-d '{"source":"test","text":"Grandmother needs oxygen","location":"Berkeley, CA"}'
curl -X POST http://localhost:8000/events/process \
-H "Content-Type: application/json" \
-d '{"source":"test","text":"Elderly person requires medical oxygen","location":"Berkeley, CA"}'
# Check clustering
curl http://localhost:8000/clusters
Expected: Both incidents in same cluster (semantic similarity detected)
🌍 Environment Variables
# Required
ASI_ONE_API_KEY=sk_... # Fetch.ai ASI:One API key
REDIS_HOST=localhost
REDIS_PORT=6379
# Optional
BROWSERBASE_API_KEY=... # For resource search
DEEPGRAM_API_KEY=... # For future audio processing
🚀 Deployment
Production Checklist
- Verify ASI:One API key
- Configure production Redis
- Set CORS for production domain
- Build frontend:
npm run build - Use gunicorn:
gunicorn main:app -w 4 -k uvicorn.workers.UvicornWorker - Set up monitoring/logging
- Configure SSL/HTTPS
🤝 Contributing
This project demonstrates Fetch.ai's ASI:One API capabilities for crisis management. Contributions welcome!
Enhancement Ideas
- Real Browserbase web scraping for resources
- Historical analytics and trend detection
- Multi-language support
- Voice input via Deepgram
- Mobile app (React Native)
- Notification system for responders
📄 License
MIT License - See LICENSE file for details
🙏 Acknowledgments
- Fetch.ai for ASI:One API
- OpenStreetMap for map tiles
- Nominatim for geocoding
- Leaflet for map visualization
📞 Support
For issues or questions:
- Check SETUP.md for installation help
- Review ASI_ONE_INTEGRATION.md for API details
- Verify Redis is running:
redis-cli ping - Check console logs for errors
✨ What Makes This Special?
🎯 100% ASI:One Powered
- No OpenAI, Claude, or other AI services needed
- Single API key for all AI features
- Unified billing and quota management
🧠 Intelligent Clustering
- Semantic similarity (not just keywords)
- Geographic proximity awareness
- Automatic category assignment
🎨 Beautiful UX
- Color-coded visual system
- Interactive map with popups
- Category-based organization
- Real-time updates
🛡️ Production-Ready
- Graceful fallbacks
- Error handling
- Redis caching
- Scalable architecture
Built with ❤️ for emergency response teams worldwide
Powered by Fetch.ai's ASI:One API - The future of decentralized AI 🚀
Analysis
View
Metric
No commits on this project resolved to a GitHub account.
Technology
- CSSIn code
- FastAPIIn code
- Next.jsIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- JavaScriptClaimed
- RedisClaimed
7 of 9 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeConfig
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
83 KB
Source files
50
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
jshimpi02/Lifeline-AI
69 files · 470 KB · @ 354c180
Structure
Interface
35 files · 51%Screens, components and styles rendered to the user.
API & routing
4 files · 6%Request entry points: routes, handlers and controllers.
Application logic
3 files · 4%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python55%
- TypeScript29%
- Markdown15%
- CSS1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 15- axios
- leaflet
- next
- react
- react-dom
- react-leaflet
- +9 more
backend/requirements.txt
pypi · 5- fastapi
- numpy
- pydantic
- python-dotenv
- uvicorn
browserbase-agent/package.json
npm · 4- @browserbasehq/stagehand
- dotenv
- +2 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Feature verification
Explainable priority reasoningVerified
The system must show why an incident was prioritized, through factors like medical need, trapped people, rising water, multiple related reports
Claimed on Devposthigh confidencebackend/app/main.py:188— /clusters/{cluster_id}/explain builds a reasoning list from urgency, people affected, needs, multiple sources, and confidence
Fallback to rule-based logic if ASI:One API unavailableVerified
AI Recommendations with fallback to rule-based logic if API unavailable
Claimed on readmehigh confidencebackend/app/agents/coordinator_agent.py:82— generate_recommendation catches exceptions from asi_one_json and falls back to the cluster's rule-based recommended_action
FastAPI backend with endpoints for report processing, clusters, priority queueVerified
Backend built using FastAPI with endpoints to process crisis reports, retrieve incident clusters, and generate a priority queue
Claimed on Devposthigh confidencebackend/app/main.py:22— FastAPI app with /events, /clusters, /clusters/{id}, /agent/process-report endpoints implemented
Historical crisis memory / similar-past-incident lookupVerified
It learns from past crises to help responders prioritize life-saving actions
Claimed on Devpostmedium confidencebackend/app/historical_memory.py:17— find_similar_history compares a cluster against backend/data/historical_disasters.json using cosine similarity and returns a memory insight; note this is a local JSON file, not Redisbackend/data/historical_disasters.json— Historical disaster dataset backing the memory lookup
Incident fusion using weighted score (semantic + location + time + type)Verified
Fusion Score = w1(semantic similarity) + w2(location distance) + w3(time closeness) + w4(event type match)
Claimed on Devposthigh confidencebackend/app/fusion.py:70— fusion_score computes 0.45*semantic + 0.25*location + 0.20*time + 0.10*type, matching the claimed weighted formula, and main.py merges events into clusters when the score exceeds FUSION_THRESHOLD
Multi-agent pipeline (extraction, fusion, memory, prioritization, coordinator)Verified
Multi-agent system with data ingestion, extraction, fusion, memory, and prioritization agents coordinated by ASI:One
Claimed on Devposthigh confidencebackend/app/agents/coordinator_agent.py:9— CoordinatorAgent wires ExtractionAgent, FusionAgent, MemoryAgent, PrioritizationAgent together and calls ASI:One for a final recommendationbackend/app/agents/asi_tool_orchestrator.py:12— ASIToolOrchestrator drives the same agents via ASI:One tool-calling with a submit_to_fusion/retrieve_memory/rank_clusters tool loopbackend/app/main.py:352— /agent/process-report and /agent/asi-process-report endpoints expose the agent pipeline
Priority scoring based on urgency, medical need, vulnerability, repeated confirmationVerified
Priority scoring to rank incidents based on urgency, medical need, vulnerability, and repeated confirmation
Claimed on Devposthigh confidencebackend/app/scoring.py:7— calculate_priority weights max urgency, medical needs set, vulnerable-word matches, people affected, and multi-source confirmation into a 0-100 score
Responder dashboard (priority queue, map, clusters view)Verified
Responder dashboard to show the most urgent incidents and recommended actions; Priority Queue, Map View, Clusters tab
Claimed on Devposthigh confidencefrontend/components/PriorityQueue.tsx:1— Renders clusters sorted by priority_scorefrontend/components/IncidentMap.tsx:1— Dynamically loads a Leaflet-based MapInner map componentbackend/app/routes/map.py:7— /map/clusters and /map/events endpoints supply data for the map view
Auto-refresh every 10 secondsCode-supported
Real-time Updates - Auto-refresh every 10 seconds
Claimed on readmelow confidencefrontend/app/page.tsx:168— page.tsx contains dashboard/status text referencing Browserbase; a specific 10-second polling interval was not located in the reviewed portion of this file
Color-coded event type categoriesCode-supported
6 distinct event types color-coded (Medical, Rescue, Flooding, Power Outage, Shelter, General)
Claimed on readmemedium confidencebackend/app/agents/extraction_agent.py:11— Backend only classifies into flood, rescue, medical_rescue, and other; shelter_update and power_outage/general categories referenced in fusion.py's COMPATIBLE_TYPES and scoring.py's recommended_action but frontend color-coding could not be located in the reviewed components
Data ingestion agents (web/weather source) using BrowserbaseCode-supported
Data ingestion agents for collecting crisis signals from alerts, web reports using browserbase API
Claimed on Devpostlow confidencebrowserbase-agent/index.ts:26— This 'browserbase-agent' actually fetches weather data from the public Open-Meteo API and posts synthetic reports to /agent/asi-process-report; it never imports or calls the @browserbasehq/stagehand package that is listed as a dependencybrowserbase-agent/package.json:10— @browserbasehq/stagehand is declared as a dependency but is unused in index.ts
Fragmented reports to structured incident extractionCode-supported
Each incoming report is converted into a structured incident with fields like event type, location, urgency, medical need, confidence, and source
Claimed on Devpostmedium confidencebackend/app/agents/extraction_agent.py:8— extract_event builds an IncidentEvent with event_type, location, urgency, needs, confidence, source, but classification is simple keyword matching (if 'flood' in text), not real NLP/LLM extraction
Text similarity/clustering via local vectorizerCode-supported
(supporting evidence for the semantic clustering claim, using a real but non-ASI method)
Claimed on readmehigh confidencebackend/app/embeddings.py:4— embed() uses sklearn HashingVectorizer, a local bag-of-words hashing vectorizer, not any ASI:One or external embedding API; no ASI:One embedding endpoint is called anywhere in the backend
Voice reporter UI componentCode-supported
(implied by voice ingestion claim: a UI for submitting voice reports)
Claimed on readmehigh confidencefrontend/components/VoiceReporter.tsx:14— Shows a hardcoded 'Mock Deepgram transcript' label and a plain textarea; no audio recording or Deepgram API call exists, submits typed text as a normal report
Geocoding: automatic location coordinate resolution (Nominatim)Claimed only
Geocoding - Automatic location coordinate resolution via Nominatim
Claimed on readmehigh confidenceRedis memory layer for incident clusters/contextClaimed only
Redis memory to store incident clusters and retrieve past context; Redis Cache for Clusters/Incidents
Claimed on Devposthigh confidenceSemantic similarity via AI embeddings (ASI:One)Claimed only
Uses ASI:One embeddings for semantic similarity, not just keyword matching (asi1-embedding)
Claimed on readmehigh confidenceSentry integrationClaimed only
Built with: sentry
Claimed on Devposthigh confidenceVoice report ingestion via DeepgramClaimed only
Voice calls processed using deepgram APIs; voice input via Deepgram
Claimed on Devposthigh confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.