DEV Community

Madhumitha R
Madhumitha R

Posted on

How I Built RescuRoute AI

#ai

RescuRoute AI

I created RescuRoute AI for this hackathon to explore how agentic AI can help rescue perishable shipments when route disruptions and temperature failures threaten delivery.

The Problem

Perishable shipments can become difficult to save when unexpected route incidents or refrigeration failures increase delivery time and reduce remaining shelf life.

The goal of RescuRoute AI is to continuously evaluate the shipment situation and recommend the best available action instead of simply following a fixed route.

How I Built It

RescuRoute AI uses an event-driven architecture built with Google Cloud and Google ADK.

The workflow is:

Shipment Event → Google Pub/Sub → Cloud Run → RescuRoute Agent → Decision Tools → Rescue Decision → Firestore

The agent uses Google ADK and Gemini for reasoning and orchestration. Gemini does not perform the deterministic route calculation or spoilage calculation itself. Instead, the agent reasons over structured evidence produced by specialized deterministic tools.

Decision Intelligence

The system evaluates:

  • Route travel time and incident delays
  • Remaining product shelf life
  • Temperature abuse and spoilage risk
  • Alternate route feasibility
  • Nearby buyer options when delivery is no longer viable

The decision can change as conditions worsen.

For example:

Normal conditions → MONITOR

Critical temperature + viable alternate route → REROUTE

No safe route within remaining shelf life → COMMERCIAL_RESCUE

Google Cloud Deployment

The production workflow is deployed using:

  • Google Pub/Sub for event delivery
  • Google Cloud Run for the HTTP processing endpoint
  • Firestore for persistent rescue decisions and audit records

The deployed Cloud Run service successfully received an HTTP 200 request during validation.

Testing

The project includes automated unit tests covering the agent workflow, route logic, spoilage logic, buyer evaluation, rescue decisions, and persistence.

The final test run completed with:

46 passed

What I Demonstrated

The final demo shows the complete flow from a shipment event to an intelligent rescue decision, including:

  1. Normal shipment monitoring
  2. Route incident handling
  3. Critical temperature/spoilage risk
  4. Automatic rerouting
  5. Commercial rescue when routing is no longer safe
  6. Cloud Run deployment
  7. Firestore persistence
  8. Automated test validation

Conclusion

RescuRoute AI demonstrates an end-to-end agentic workflow for making time-sensitive logistics rescue decisions using structured evidence, Google ADK, Gemini, and Google Cloud.

This project was created specifically for this hackathon.

Project Repository

https://github.com/madhu-17-SE/rescuroute-ai

Top comments (0)