The function of T cells and B cells is to recognize foreign antigens . The function of T cells and B cells is to recognize specific â non-self â antigens , during a process known as antigen presentation .