Abstract Microbiomes perform critical functions across many environments on Earth 1–3 . However, elucidating principles of their design is immensely challenging 4–7 . Using a diverse bank of human gut commensal strains and clearance of multi-drug resistant Klebsiella pneumoniae as a target, we engineered a functional synthetic microbiome using a process that was agnostic to mechanism of action, bacterial interactions, or compositions of natural microbiomes. Our strategy was a modified ‘Design-Build-Test-Learn’ approach (‘DBTL+’) coupled with statistical inference that learned design principles by considering only the strain presence-absence of designed communities. In just a single round of DBTL+, we converged on a generative model of K. pneumoniae suppression. Statistical inference performed on our model identified 15 strains that were key for community function. Combining these strains into a community (‘SynCom15’) suppressed K. pneumoniae across unrelated in vitro environments and matched the clearance ability of a whole stool transplant in a pre-clinically relevant mouse model of infection. Considering metabolic profiles of communities instead of strain presence-absence yielded a poor generative model, demonstrating the advantage of using strain presence-absence for deriving principles of community design. Our work introduces the concept of ‘statistical design’ for engineering synthetic microbiomes, opening the possibility of synthetic ecology more broadly.