CoAid: AI-powered Disaster Relief & Mutual Aid Coordinator

CoAid is a conversational AI agent and real-time logistics dashboard designed to coordinate community relief efforts, match volunteers, track evacuation shelter capacities, and manage supplies during emergency crises directly from Slack.


💡 Inspiration

During natural disasters (like floods, hurricanes, or winter storms), community response is often a race against time. While field coordinators and volunteers coordinate on Slack, supply inventories, shelter beds, and volunteer registries remain locked in isolated databases. Command centers fly blind, and field workers struggle to find up-to-date resources.

We built CoAid to connect these pieces. We wanted to create an AI assistant that lives directly in the workspace conversation, understands plain-English requests, connects securely to local databases, and streams live activity feeds to a beautiful, real-time logistics dashboard.


🛠️ How We Built It

CoAid is built on a modular, secure, and real-time stack:

  1. AI Reasoning Loop: Powered by OpenRouter (google/gemini-2.5-flash model), enabling the agent to understand natural language requests and orchestrate complex logistics workflows.
  2. Model Context Protocol (MCP): Built a local FastMCP database server (coaid_db_server.py) that translates SQLite database tables (supplies, volunteers, emergency alerts, shelters) into 10 secure Python tools exposed directly to the AI.
  3. Slack Assistant Framework: Implemented using the Slack Bolt API in Socket Mode. The bot uses interactive block elements to broadcast volunteer sign-up cards in public channels.
  4. Human-in-the-Loop (HITL) Gates: Before any database modification is committed (like writing new requests or assigning volunteers), the agent prompts coordinators with interactive "Approve" and "Cancel" buttons in Slack.
  5. Apple-Inspired Command Center: Designed a premium, monochromatic HTML5/CSS3 dashboard. It polls metrics, shows live shelter occupancy progress lines (color-coded red/yellow based on capacity), and logs active agent queries and database operations in real-time.

🚧 Challenges We Faced

  • AI Action Safety: Allowing a language model to modify database state directly is dangerous in a crisis. We overcame this by building a stateful tool-interceptor that halts writes and yields confirmation controls back to Slack, ensuring humans are always in control.
  • Grounding on Noisy Chats: Workspace conversations during a disaster are chaotic. We integrated the Real-Time Search (RTS) API to query past messages, filter out noise, and allow the AI to ground its answers using direct Slack message citations and links.
  • IDE Environments: Configuring diagnostic compilers for local static-analysis across different Python environments required creating a dedicated pyrightconfig.json path mapper.

🎓 What We Learned

  • MCP is a Game Changer: Decoupling the LLM's tools from the server via the Model Context Protocol made writing secure, database-backed utilities incredibly straightforward.
  • Functional Minimalistic Design: In a high-stress emergency situation, cluttered dashboards slow operations down. By choosing an obsidian monochromatic palette with selective system accent alerts (Red/Yellow/Green), operators can immediately target what needs their attention in seconds.

Built With

Share this project:

Updates