BackgroundNext-generation sequencing (NGS) methods for microbial profiling have increased sensitivity to detect urinary pathogens. ObjectiveTo determine whether NGS microbial profiling can be used to guide antibiotic prophylaxis and reduce infection compared with the standard of care. Design, setting, and participantsA prospective randomized controlled clinical trial of patients undergoing urologic stone interventions at an academic health center from December 2019 to January 2022 was conducted. Urine was collected at the preoperative visit for standard culture and intervention NGS diagnostics. Evaluable patients were culture negative, met 2-wk follow-up, and did not cancel surgery. Of 240 individuals (control = 121, intervention = 119), 83 control and 74 intervention patients were evaluable. InterventionMicrobial findings (paired quantitative polymerase chain reaction and NGS) were sent to an infectious disease pharmacist to recommend prophylactic antimicrobial regimen. Outcome measurements and statistical analysisThe primary outcome was postoperative urinary infection within the follow-up period (Fisher’s exact test). The primary outcome was analyzed by modified intent-to-treat (mITT) and per-protocol analyses. Secondary endpoints considered included positive culture concordance, antibiotic use, and adverse events. Additional post hoc analyses investigated factors contributing to infection (univariate logistic regression). Results and limitationsThe intervention significantly reduced postsurgical urinary infection risk by 7.1% (–0.73%, 15%) compared with the standard of care in the mITT analysis (1.4% vs 8.4%, p = 0.045) or by 8.5% (0.88%, 16%) compared with the per-protocol analysis (0% vs 8.5%, p = 0.032). NGS-guided treatment altered the distribution of antibiotics used (p = 0.025), and antibiotics poorly matched with NGS findings were associated with increased infection odds (odds ratio [OR] = 5.9, p = 0.046). Women were at greater odds to develop infection (OR = 10, p = 0.03) and possessed differentiated microbial profiles (p < 0.001). ConclusionsUrinary microbial NGS-guided antibiotic prophylaxis before endoscopic urologic stone lithotripsy improves antibiotic selection to reduce healthcare-associated urinary infections; however, treatment efficacy may be limited by the ability to adhere to the recommended protocol. Patient summaryWe investigated whether microbial DNA sequencing could improve the selection of antibiotics before kidney stone surgery in patients not known to have any bacteria in the urine on standard culture. We found that using microbe DNA to guide antibiotic choices decreased postoperative infection rate and may encourage individualized use of available antibiotics.