<b>Conclusions</b>: We uncover an endogenous defense mechanism wherein UPEC primes bladder ILC3s via trained immunity, enabling amplified IL-17A- and IL-22-mediated protection against recurrent infections. Here, IL17A is linked to infection.