Traditionally, drinking water supply infrastructures have been designed to store as much water as possible and to do so during the energy cheap hours. This approach is unsustainable today. The use of digital systems capable of modeling the behavior of infrastructures and the creation of intelligent control systems can help to make drinking water supply systems more efficient and effective, while still meeting minimum service requirements. This work proposes the development of a control system, based on multi-agent systems (MAS), capable of generating an intelligent control over a drinking water infrastructure, based on the use of local interests of the agents and with an emergent behavior coherent with the needs. To validate the proposal, a simulator based on the infrastructures of a medium-sized Spanish city of 5000 inhabitants has been built and the control has been simulated using the MAS. The results show how the system can maintain the objectives set, handling unknown situations, and facilitating the development of future physical systems based on a just-in-time paradigm that guarantees sustainability, as it allows the generation of virtualizations of the infrastructures and their behavior, thus being able to study the best option for an infrastructure to resolve a supply situation.