Conjugative plasmids mediate the spread and maintenance of diverse traits in microbial communities, but the conditions underlying plasmid persistence are poorly understood. Here, Wang and You present a modeling framework for analysis of gene flow and prediction of plasmid persistence and abundance in complex communities.