Background : There are few large longitudinal microbiome studies, and fewer that include controlled, well-annotated perturbations between sampling-points. Thus, there are few opportunities to employ data-driven computational analyses of perturbed microbial communities over time. Results : Our novel computational system simulates the dynamics of microbial communities under perturbations using genome-scale metabolic models (GEMs). Perturbations include modifications to a) the nutrients available in the medium, allowing modelling of prebiotics; and/or b) the microorganisms present in the community to model, for example, probiotics or pathogen infection. These simulations generate the quantity and types of information required by MDPbiome, an AI system which builds predictive models suggesting the perturbation(s) required to engineer microbial communities to a desired state. We call this novel combination of technologies "MDPbiomeGEM"'. We demonstrate, in a Crohn’s disease microbiome, that MDPbiomeGEM correctly models the influence of both prebiotic fiber and a probiotic, resulting in a recommendation to consume inulin to recover from dysbiosis, consistent with prior biomedical knowledge. When used to model the soil microbiome's ability to degrade the herbicide Atrazine, differing recommendations arise depending on the highly variable state of the initial soil microbial composition, highlighting the relevance of both phosphate and microbes (i.e. Halobacillus sp. and H.stevensii ) in a directed microbiome engineering strategy, consistent with previously published observations. Conclusions : MDPbiomeGEM generates large volumes of longitudinal data of complex microbial communities experiencing perturbations. Machine learning on these data reveal patterns consistent with existing biological knowledge, supporting the validity of the approach. MDPbiomeGEM could save research resources by optimizing sample collection in metagenomics studies through identification of "informative" scenarios/time-points, or by predicting optimal in-vitro culture formulations for generating performant synthetic microbial communities. Finally, MDPbiomeGEM outputs include detailed information about the metabolic state of the community, which can be used to further interpret the impact of perturbations, and potentially could be used to predict novel metabolic biomarkers of a microbiome's state.