S
Background
AI & MLOps7 min readFeb 15, 2026

Building JalSakhi: Architectural Deep Dive into an AI-Powered Water Intelligence System

How 4 engineers built an AI-powered water intelligence system for rural India, winning Top 5000 out of 1 Crore registrants at Bharat Mandapam.

Published By
Sameer Bagul

Sameer Bagul

Software Engineer

Topics Covered
#AI#MLOPS#FASTAPI#LLAMA 3.1#RAG#REACT NATIVE#MONGODB

How 4 engineers built an AI-powered water intelligence system for rural India, winning Top 5000 out of 1 Crore registrants at Bharat Mandapam.

The Problem: Silently Running Out of Water

When the last drop of groundwater disappears, no AI model, startup pitch, or funding round can fix it. Millions of villages across India are silently running out of water while the world scrolls past. We built JalSakhi to change that.

JalSakhi isn't just a monitoring dashboard — it predicts groundwater depletion, warns village administrators, and orchestrates water allocation before crisis strikes.


System Architecture & MLOps Infrastructure

Instead of treating JalSakhi as a hackathon toy, we treated it as a production-grade distributed system:

1. FastAPI Microservices Engine

Each machine learning model operates in its own isolated Python FastAPI microservice:

  • Crop Water Recommendation: Powered by Random Forest classifiers trained on soil and climate datasets.
  • Soil Moisture Prediction: Powered by LSTM (Long Short-Term Memory) neural networks for time-series forecasting.
  • Village Water Allocation: Powered by Meta's Prophet for seasonal trend forecasting.

2. Autonomous RAG AI Agent Layer

Farmers don't interact with raw model outputs, REST APIs, or predictions. We engineered a Retrieval-Augmented Generation (RAG) LLM Agent powered by Llama 3.1:

  • Natural Language Queries: Farmers ask questions in regional languages.
  • Tool Routing & Orchestration: The LLM agent interprets the question, retrieves village context, and routes execution to the exact ML microservice required.
  • Structured Response Synthesis: Generates clear, actionable advice (e.g., 'Irrigate 20 minutes tomorrow morning').

3. Backend & Client Stack

  • Orchestrator: Node.js + Express API Gateway managing cross-service calls.
  • Database: MongoDB Atlas for village telematics, historical logs, and user profiles.
  • Mobile Client: React Native + Expo app built for low-connectivity environments.

Lessons from Bharat Mandapam (India Innovates 2026)

Presenting JalSakhi at Bharat Mandapam among 5,000 finalists selected from 10 million registrations taught us that the best engineering doesn't pitch profit margins — it solves fundamental human problems.