The small intestine contains CD4+CD8αα+ double-positive intraepithelial lymphocytes (DP IELs), which originate from intestinal CD4+ T cells through down-regulation of the transcription factor Thpok and have regulatory functions. DP IELs are absent in germ-free mice, which suggests that their differentiation depends on microbial factors. We found that DP IEL numbers in mice varied in different vivaria, correlating with the presence of Lactobacillus reuteri. This species induced DP IELs in germ-free mice and conventionally-raised mice lacking these cells. L. reuteri did not shape the DP-IEL-TCR (TCR, T cell receptor) repertoire but generated indole derivatives of tryptophan that activated the aryl-hydrocarbon receptor in CD4+ T cells, allowing Thpok down-regulation and differentiation into DP IELs. Thus, L. reuteri, together with a tryptophan-rich diet, can reprogram intraepithelial CD4+ T cells into immunoregulatory T cells.