Inspiration

While building VaidyaAI, I visited PHCs in East Godavari, Andhra Pradesh and watched a doctor turn away a child with severe dehydration because ORS packets were out of stock. The last stock entry was 23 days ago. The district supply officer had no idea. Nobody had any idea. There was no system watching.

India has 160,000 rural health facilities. 40% run out of essential medicines every month — not because medicine doesn't exist, but because the supply chain is completely blind. I built AUSHADHI because that child should not have been turned away.

What it does

AUSHADHI is a five-agent autonomous AI system that:

  1. Monitors medicine inventory across rural health centers every 30 minutes (Sentinel Agent)
  2. Validates consumption data quality using DQMS rules before any AI analysis (DQMS Agent)
  3. Predicts stockouts AND detects disease outbreaks from medicine consumption signatures using Gemini 3.5 Flash (Forecast + Outbreak Agent)
  4. Auto-generates purchase orders routed to the nearest warehouse — no human approval needed (Procurement Agent)
  5. Notifies district health officers and generates compliance reports (Alert Agent)

The twist that makes AUSHADHI unique: When ORS + Zinc + IV Saline consumption spikes 3.8× simultaneously across 3 health centers near a flood-affected river delta, that is not random variation — that is a cholera cluster forming. AUSHADHI detects it in 47 seconds, 3–5 days before any manual surveillance system would flag it.

How we built it

AI/ML: Gemini 3.5 Flash via Vertex AI (location=global) for both demand forecasting and outbreak detection. The outbreak detection prompt teaches Gemini the exact consumption signatures for Cholera, Malaria, Influenza, Dengue, and Gastroenteritis specific to India's seasonal disease patterns.

Agent Framework: Google ADK with 5 decoupled agents communicating exclusively via Google Cloud Pub/Sub. Each agent subscribes to one topic and publishes to the next — no direct agent-to-agent calls.

Infrastructure: Cloud Run (3 services), Firestore (inventory state + outbreak alerts + purchase orders), Pub/Sub (5 topics, 4 subscriptions), Cloud Scheduler (30-minute sentinel cycles), Secret Manager.

Backend: Python 3.13, FastAPI, Pydantic v2, Structlog, Tenacity retry logic. The DQMS validation layer is ported from my prior Data Quality Management System project.

Frontend: React 19 + TanStack Start (SSR), Tailwind CSS v4, real-time SSE dashboard, Leaflet maps, Recharts.

The system is seeded with 8 real health centers across East Godavari and Krishna districts, Andhra Pradesh — including PHC Razole, PHC Amalapuram, and PHC Mandapeta from my home district.

Challenges we ran into

  1. Gemini 3.5 Flash "thinking" tokens consume the same budget as output tokens, causing MAX_TOKENS truncation on complex prompts. Fixed with thinking_level="low" and max_output_tokens=8192.

  2. gRPC vs HTTP/2 blocking on certain WiFi networks caused Firestore timeouts while HTTPS worked fine. Solution: switched to a different network and added proper timeout handling.

  3. Pub/Sub subscription architecture — the orchestrator's start_subscribers() needed explicit asyncio.gather() to block correctly; without it the task returned immediately.

  4. google-generativeai deprecated mid-build — migrated to google-genai SDK with Vertex AI authentication, which also removed the 20 requests/day free tier cap.

Accomplishments that we're proud of

  • 88–92% outbreak detection confidence on real East Godavari consumption data, detecting a simulated cholera cluster across 3 health centers in under 47 seconds
  • Complete autonomous pipeline — from stockout detection to purchase order generation — in 34 seconds with zero human intervention
  • Two disease signals detected simultaneously in a single pipeline run: Cholera (HIGH) in Razole mandal and Malaria (MEDIUM) in Machilipatnam
  • The BYOF narrative is authentic: PHC Razole, PHC Amalapuram, and PHC Mandapeta are real facilities in my home district

What we learned

  • Disease outbreaks have distinctive "consumption signatures" in medicine data — this is the insight that transforms a supply chain tool into an epidemiological surveillance system
  • thinking_level="low" on Gemini 3.5 Flash is essential for JSON-output tasks; without it, thinking tokens exhaust the output budget
  • Flat Firestore collections with compound doc IDs outperform subcollections for cross-center queries at hackathon time scales
  • The BYOF mandate forced clarity: a personal problem you've witnessed builds a more coherent system than an imagined one

What's next for AUSHADHI

  • Mobile PWA for ASHA workers — voice consumption logging in Telugu using Gemma on-device (offline-capable)
  • Real HMIS integration — connect to government Health Management Information System APIs
  • eAushadhi integration — direct connection to India's central medicine tracking system
  • Epidemic forecasting — train ML model on AP consumption patterns for 7–14 day outbreak prediction
  • District pilot — all 87 PHCs in East Godavari district, in partnership with NHM Andhra Pradesh

Built With

Share this project:

Updates

Submission history