ResQ — Autonomous Emergency Response Agent
Inspiration
Every year, over 1.3 million people lose their lives in road accidents worldwide. For two-wheeler riders, delivery workers, and night commuters, a severe crash can leave them incapacitated and unable to dial for help.
The probability of survival decreases exponentially as response latency $t_{delay}$ increases, following an empirical survival probability function:
$$P_{ ext{survival}}(t) = P_0 \cdot e^{-\lambda t_{ ext{delay}}}$$
where $\lambda > 0$ represents the decay rate of life-saving medical intervention over time $t$. Existing emergency systems rely heavily on manual calls or basic hardware sensors that trigger frequent false alarms—such as dropping a phone on the floor. We wanted to build an intelligent, zero-hardware safety net that leverages the smartphone already in your pocket to detect severe crashes, verify real danger using AI, and save critical minutes when every second counts.
What it does
ResQ is an autonomous, AI-driven emergency response agent for smartphones that senses, reasons, and acts during high-impact accidents:
- Perception: Continuously monitors live accelerometer data to detect severe G-force spikes. Upon impact, it immediately grabs live GPS coordinates $(x_{ ext{lat}}, y_{ ext{lon}})$ and captures camera frames $\mathcal{F}_t$.
- Reasoning (Gemini Vision AI): Analyzes captured frames $\mathcal{F}t$ along with impact vectors to evaluate risk probability $R{ ext{accident}}$:
$$R_{ ext{accident}} = f_{ ext{Gemini}}(\mathcal{F}t) \cdot \mathbb{I}(|\mathbf{a}(t)| > a{ ext{threshold}})$$
where $\mathbb{I}(\cdot)$ is the indicator function for acceleration magnitude $|\mathbf{a}(t)| = \sqrt{a_x^2 + a_y^2 + a_z^2} > a_{ ext{threshold}}$. If the phone is tucked in a pocket, a voice fail-safe ("Say 'I'm okay' to cancel") activates with a countdown timer $\Delta t_{ ext{cancel}}$ to filter out false positives.
- Action: If a true crisis is confirmed ($R_{ ext{accident}} \ge R_{ ext{crit}}$), ResQ automatically initiates an emergency SOS call to pre-registered contacts with live latitude/longitude location tracking.
How we built it
- Mobile & Cross-Platform UI: Built using Capacitor and Android Studio to interact natively with mobile hardware (accelerometer, camera feeds, notifications, and dialer).
- AI Agent & Vision Layer: Integrated Gemini APIs to process multimodal input (captured image frames + sensor logs) for real-time scene reasoning and threat confidence scoring.
- Backend & Workflow: Structured with a clean perception-reasoning-action pipeline, handling state transitions from impact detection to emergency call execution.
Challenges we ran into
- Handling Pocket False Positives: Standard camera checks fail when a phone is in a rider's pocket. We solved this by designing an automated voice-interaction fail-safe layer with a countdown timer $\Delta t$.
- Low-Latency Sensor Processing: Balancing continuous accelerometer monitoring with real-time frame analysis without overwhelming phone resources or draining battery life. Sensor frequency was tuned to balance Nyquist sampling rate criteria:
$$f_{ ext{sampling}} \ge 2 \cdot f_{ ext{impact_max}}$$
- Edge Case Scene Analysis: Fine-tuning the prompt logic for the vision model so it accurately differentiates between a casual seated position and an actual accident scene.
Accomplishments that we're proud of
- End-to-End Autonomous Pipeline: Successfully built a functional prototype that seamlessly transitions from physical impact sensing to vision-based AI reasoning and automated emergency dialing.
- Zero Hardware Cost: Transformed standard smartphone components (camera + accelerometer) into an intelligent, life-saving co-pilot without requiring external hardware attachments.
What we learned
- How to combine hardware sensor streams (accelerometer, GPS) with cloud-based vision models (Gemini API) to build reactive, context-aware AI agents.
- The critical importance of fail-safes and confidence scores when building applications where false positives cause panic, but false negatives cost lives.
What's next for RESQ
- Automated Emergency Services Integration: Direct API dispatch to local ambulance services alongside family contacts.
- On-Device Micro AI Models: Running lightweight local vision models on-device for instant offline accident verification in zero-connectivity regions.
- Crash Blackbox & Medical ID Sync: Automatically sharing the user's blood group, pre-existing conditions, and crash-impact telemetry with attending paramedics.

Log in or sign up for Devpost to join the conversation.