When catastrophic flash floods and landslides struck Wayanad, hundreds of lives were lost not from a shortage of rescue fleets—they were lost to coordination paralysis.
Arterial roads washed away, bridges collapsed, and emergency responders fractured across radios, WhatsApp groups, and spreadsheets.
We built RescueGrid for the FalkorDB "Graph Hacks: Context for AI Agents" Hackathon to solve this by modeling the entire crisis zone as a living, mutating knowledge graph.
💥 WHY TRADITIONAL DATABASES FAIL IN DISASTERS
During natural disasters, databases must answer multi-hop topological questions:
Which stranded victims can be reached by an available rescue boat from a staging base without crossing a severed bridge?
• Relational SQL Databases Choke: They crash under 6-way recursive JOIN explosions trying to calculate paths across damaged road networks in real time.
• Vector RAG Blindly Hallucinates: Semantic vector search is oblivious to physical topography. An embedding search will route an ambulance to a victim 1 km away, completely unaware that the river bridge between them has collapsed.
• The Silo Chaos: Responders double-book boats in one sector while remote, cut-off families drown without aid.
🧠 ENTER FALKORDB: THE COGNITIVE GRAPH BRAIN
RescueGrid eliminates coordination paralysis by using FalkorDB as its unified single source of truth and shared multi-agent memory bank. We run zero parallel relational databases and zero vector stores.
FalkorDB completely transformed how we architected our autonomous agent system:
- ⚡ Sub-15ms Multi-Hop Hazard Evasion Our Gemini 1.5 Flash Dispatch Agent traverses complex graph paths across victims, severed roads, staging bases, and available fleets:
MATCH (reqLoc:Location { id: $locationId })
MATCH (res:Resource { status: 'available' })-[:LOCATED_IN]->(resLoc:Location)
OPTIONAL MATCH (resLoc)-[route:CONNECTED_BY]->(reqLoc)
OPTIONAL MATCH (reqLoc)-[:CONNECTED_BY]->(resLoc)
RETURN res.id, res.name, res.type, res.capacity, resLoc.name, route.status
When field teams flag a bridge as collapsed, the edge dynamically updates to status = 'blocked'. FalkorDB traverses alternative paths in under 12ms, autonomously switching from wheeled ambulances to amphibious skiffs.
🔄 Queue-Free Shared Agent Memory (Track 02)
We completely eliminated message brokers like Kafka or RabbitMQ. Our Dispatch Agent and Query Agent coordinate shared state directly through FalkorDB's mutating graph topology. When the Dispatch Agent locks an asset, the Query Agent reads the updated topology within 12 milliseconds.🔒 Atomic Asset Locking Without Race Conditions
To prevent fatal double-booking of scarce boats under heavy concurrency, we execute atomic Cypher transactions:
MATCH (s:SOSRequest { id: $sosId }), (r:Resource { id: $resourceId })
SET s.status = 'assigned', r.status = 'assigned'
MERGE (s)-[a:ASSIGNED_TO]->(r)
ON CREATE SET a.reasoning = $reasoning, a.assigned_at = $timestamp
💬 Zero-Hallucination "Ask the Brain"
Incident commanders ask questions in plain English ("Is the Fisherfolk Skiff in Chooralmala currently available?"). Groq converts speech to openCypher in under 15ms for 100% grounded situational awareness with zero hallucination.🏛️ Tri-Layer Memory Architecture
• Episodic Memory: Day 1 to Day 3 crisis progression and reasoning logs stored in (:AgentLog).
• Semantic Memory: Real-world relief hierarchies linking agencies (NDRF, Indian Army, Red Cross) to equipment capabilities.
• Procedural Memory: Pathfinding traversals that enforce physical hazard constraints.
🌟 WHAT WE LEARNED WITH FALKORDB
- In-Memory Graph Speed is Unmatched: Running on top of Redis, FalkorDB executed complex multi-hop traversals with sub-millisecond query speed—far outpacing heavy graph engines.
- Deterministic Graphs Beat Vector Search for Agents: Having a structured, living graph topology eliminated LLM hallucinations in physical navigation.
- Subquery Handling: Because FalkorDB's openCypher engine does not currently support EXISTS { MATCH ... } subqueries, we prompt-engineered our agents to use OPTIONAL MATCH ... WHERE var IS NULL for negation, which worked smoothly.
🔗 CHECK OUT RESCUEGRID
• GitHub Repository: https://github.com/Manthan-cpp/RescueGrid
Built with passion for FalkorDB and WeMakeDevs!
Top comments (0)