(A) Unencapsulated cells activate both direct and indirect antigen recognition pathways. For direct antigen recognition, host CD4+ and/or CD8+ T cells recognize foreign antigens presented on cells, via donor MHC-II and MHC-I molecules, respectively. Indirect antigen recognition is mediated by host antigen-presenting cells (APCs), where donor antigens are presented to host CD4+ and/or CD8+ T cells via host MHC molecules. Following antigen presentation, T cells are activated to proliferate and mature to graft-specific cytotoxic T cell effectors. (B) For encapsulated cells, e.g. alginate microencapsulation, direct cell-cell contact of donor cells to host T cells is blocked by the polymer barrier. However, antigens shed by the donor cells can diffuse out of the hydrogel for collection and presentation by host APCs, leading to indirect antigen recognition and subsequent antigen-specific T cell expansion and activation.