We present an electrochemical platform designed to reduce time of Escherichia coli bacteria detection from 24 to 48-h to 30 min. The presented approach is based on a system which includes gallium-indium (eGaIn) alloy to provide conductivity and a hydrogel system to preserve bacteria and their metabolic species during the analysis. The work is dedicated to accurate and fast detection of Escherichia coli bacteria in different environments with the supply of machine learning methods. Electrochemical data obtained during the analysis is processed via multilayer perceptron model to identify i.e. predict bacterial concentration in the samples. The performed approach provides the effectiveness of bacteria identification in the range of 102–109 colony forming units per ml with the average accuracy of 97%. The proposed bioelectrochemical system combined with machine learning model is prospective for food analysis, agriculture, biomedicine. © 2024