Previous studies only documented lab- or pilot-scale biogas production from domestic and agricultural wastes. However, there are still no published studies on modelling and optimization of biogas production from domestic and agricultural wastes using an in silico platform. In this study, data-driven modelling and optimization of anaerobic digestion (AD) of kitchen waste (KW), cow dung (CD) and poultry droppings (PD) are presented along with process simulation modelling (PSM) via Aspen Plus. Response surface methodology (RSM) and artificial neural network (ANN) models utilized data generated through simulation. Temperature, hydraulic retention time (HRT) and pressure are the inputs, and methane content is the output. The most important operating parameter that influences methane output was identified through sensitivity analysis. As evidenced by the differences in simulation and experimental results, PSM accurately mimics AD. The coefficient of determination (R-2) for RSM (KW-CH4: 0.999; CD-CH4: 0.990; PD-CH4: 0.999) and ANN (KW-CH4: 0.999; CD-CH4: 0.999; PD-CH4: 0.998) were obtained. In addition, the root mean square error (RMSE) for RSM (KW-CH4: 0.311; CD-CH4: 0.968; PD-CH4: 0.211) and ANN (KW-CH4: 0.332; CD-CH4: 0.382; PD-CH4: 0.474) were evaluated. The results showed that both RSM and ANN models performed efficiently and accurately. The optimal methane contents for KW (59.46%), CD (55.00%) and PD (60.21%) were obtained at temperature (37.26 degrees C), HRT (15.20 days) and pressure (0.89 bar). According to sensitivity study, pressure has the most influence, while HRT has the least. Future biogas projects can use the findings of this discovery.