DAI-DEPUR: an integrated and distributed architecture for wastewater treatment plants supervision Miquel Sànchez and Ulises Cortés Secció d'Intel.ligència Artificial. Departament de Llenguatges i Sistemes Informàtics. Universitat Politècnica de Catalunya. C. Pau Gargallo 5. 08028 Barcelona. Javier Lafuente Unitat d´Enginyeria Química. Departament de Química. Universitat Autònoma de Barcelona. Edifici C. 08193 Bellaterra. Barcelona. Ignasi R.-Roda and Manel Poch Laboratori d'Enginyeria Química i Ambiental. Universitat de Girona. Plaça Hospital 6. 17071 Girona. Abstract. The activated sludge process –the main biological technology usually applied to wastewater treatment plants (WWTP)– directly depends on live beings (microorganisms), and therefore, on unforeseen changes experimented by them. It could be possible to get a good plant operation if the supervisory control system is able to react to the changes and deviations of the system and can take the necessary actions to restore the system's performance. These decisions are often based both in Physical, Chemical, Microbiological principles (suitable to be modelled by conventional control algorithms) and in some knowledge (suitable to be modelled by Knowledge-Based Systems). But one of the key problems in Knowledge-Based control systems design is the development of an architecture able to manage efficiently the different elements of the process (integrated architecture), to learn from previous cases (specific experimental knowledge) and to acquire the domain knowledge (general expert knowledge). These problems increase when the process belongs to an ill-structured domain and is composed by several complex operational units. Therefore, an integrated and distributed AI architecture seems to be a good choice. This paper, proposes an integrated and distributed supervisory multi-level architecture for the supervision of WWTP, that overcomes some of the main troubles of classical control techniques and those of Knowledge-Based Systems applied to real world systems. Key words. Integrated AI systems, Distributed AI systems, Knowledge-Based Systems, Real-Time Supervision and Control, Wastewater Treatment, Knowledge Engineering, Environmental Engineering.