The vertebrate intestinal tract is colonized by hundreds of species of bacteria that outnumber the total cells in the host, yet must be compartmentalized and tolerated to prevent invasive growth and harmful inflammatory responses. A key function of commensal microbes is to contribute to the adaptive immune repertoire and to diverse lymphocyte effector functions. T cell responses against non-invasive commensals contribute to shaping the repertoire of effector/memory and regulatory T cells. How T cells elicited by commensal bacteria can influence autoimmunity, resistance to pathogenic microbes, and anti-tumor responses are central questions that remain unsolved. We are studying the antigenic specificity of microbiota-induced T cells and the mechanisms by which their functions are acquired upon interaction with distinct commensal species. We find that Th17 cells, which are central to mucosal barrier defense but also participate in autoimmune disease, are induced by specific constituents of the microbiota, and acquire effector function only after additional exposure to endogenous adjuvants, such as the serum amyloid A proteins. Whereas some Th17 cells contribute to barrier defense and protection from potentially invasive enteropathogenic microbes, others can be highly inflammatory, but are normally restrained by commensal bacteria-induced regulatory T cells. Our studies in mice are not only relevant for human autoimmune diseases, many of which have Th17 cell involvement, but may also provide insights into how commensal microbe-specific T cell responses could be harnessed for mucosal vaccination and cancer immunotherapy.