AWS Builder Center
Here Goes the Water Again! Teaching an AI to Find the Leaks Nobody Can See

Here Goes the Water Again! Teaching an AI to Find the Leaks Nobody Can See

My tap keeps running dry, so I built AquaAgent: five sensors, real hydraulic physics and a graph neural network that points to where a hidden leak probably is, running on AWS.

The bath that never happened

Let me tell you how my evenings go.
Long day at college. Brain fried. One plan: a bath.
I walk in, turn the tap, and it coughs. Then nothing.
Here goes off the water again!!!
And the cruel part? When the water goes, it almost never comes back the same day. Bath cancelled. Tomorrow's plan: hope.
If you live in an Indian city, you're nodding right now. You've probably stopped asking why.
In June 2026, Pune got  nearly 1,200 complaints in nine days  of alternate-day supply: late water, no pressure, sometimes no water. Officials pointed to valve operations, pressure management and technical problems in the network.
Nobody said which pipe.

So where does the water go?

Quick honesty check: Pune's alternate-day supply is about a water shortage and sharing it out, not about leaks.
But here's the annoying part. Low pressure at your tap could mean too little water, a closed valve, a demand spike, or a leak. From the bathroom, they all feel the same.
And leaks are sneaky. Worldwide, cities lose roughly  30% of the water they put in the pipes  before it is ever billed. (That bucket also holds theft and meter errors, not only leaks.) A burst gets fixed because everyone sees it. A small leak under the road can run for months.
Finding it means walking streets with listening gear, or putting a sensor on every junction. Old networks can't afford that.
So here's the question I'm chasing:
If you can only watch a few points in a water network, can you work out what's happening everywhere else, and spot when reality stops matching?
AquaAgent is my attempt: five sensors, real hydraulic physics and a graph neural network. It all runs on a simulated network, not live PMC data, and I'll tell you where that matters.
AquaAgent Home Page

First, let me show you what it does.

Okay, but what does it do?

I break a pipe on purpose. AquaAgent tells me where.
The setup is a small simulated water network with just five sensors: three read pressure, two read flow. I hit LEAK on pipe 5 and wait.
Then it speaks up on its own:
AI alert banner, probable zone Z3, most likely pipe 5

Zone Z3, pipe 5 ranked first. I never told it where I clicked.
Hit EXPLAIN WHY and it writes the report, in plain English, with its evidence:
Explainable AI report, probable leak in zone Z3

One honest detail: it says probable zone, not "dig here". I'd rather be honestly vague than confidently wrong.

Fair question: is this real?

The water isn't real. The physics is.
I used the EPA's own open-source water simulator (EPANET, driven from Python through a library called WNTR). A leak is just a hole with an area, and water escapes faster where the pressure is higher. I simulated 12,000 days of the network: leaks, bursts, and plenty of ordinary demand swings, so a pressure dip alone doesn't count as a leak.
Two rules keep it honest. The AI only ever sees the five sensors, never the hidden truth. And the screen computes nothing itself; it only shows what the API sends.

The brain: four small jobs

The trick: ask the network what every sensor should read, hide one sensor at a time, and watch for the one that disagrees. Four little models pass that along like a relay.
AI/ML pipeline flowchart

If the report quotes a number that isn't in the evidence, it gets one retry and then a plain template takes over. Better a boring report than a confident wrong one.

The body: one small task on AWS

The brain needs somewhere to live. Two paths: a live one that answers you, and an offline one that builds the models.
AWS architecture flowchart

One simulator tick (20 steps, every model called) takes about 0.6 s end to end. Running it costs about $3 a day while it's up. Training was under $1 because every job ran on Spot, and each AI report costs about $0.0003.

What it can't do (yet)

I'd rather you hear this from me.
  • It's a simulation. One small 8-node network, not live PMC data.
  • Five sensors only see so much. Bursts get caught about 4 times in 5, large leaks about half the time, medium ones about a third. Small leaks slip through.
  • It names an area, not an exact spot. Zone first, then ranked pipes.
Next up: bigger networks and real sensor data.
Water disappears underground. We work out where. (Probably.)
Built for the WeMakeDevs Environmental Hacks hackathon, October 2026.
#BharatBuilds #WeMakeDevs #AWS
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article