Background: Kidney transplantation is the optimal treatment to cure the patients with end-stage renal disease (ESRD). However, the infectious complication, especially pneumonia, is the main cause of mortality in the early stage. Immune monitoring by relevant biomarkers provides direct evidence of immune status. We aimed to study the association between immune monitoring and pneumonia in kidney transplant patients through machine learning models. Methods: A total of 146 patients receiving the immune monitoring panel in our center, including 46 pneumonia recipients and 100 stable recipients, were retrospectively reviewed to develop the models. All the models were validated by external data containing 10 pneumonia recipients and 32 stable recipients. The immune monitoring panel consisted of the percentages and absolute cell counts of CD3+CD4+ T cells, CD3+CD8+ T cells, CD19+ B cells and natural killer (NK) cells, and median fluorescence intensity (MFI) of human leukocyte antigen (HLA)-DR on monocytes and CD64 on neutrophils. The machine learning models of support vector machine (SVM), logistic regression (LR), multi-layer perceptron (MLP) and random forest (RF) were applied for analysis.Results: The pneumonia and stable groups showed significant difference in cell counts of each subpopulation and MFI of monocyte HLA-DR and neutrophil CD64. The SVM model by monocyte HLA-DR (MFI), neutrophil CD64 (MFI), CD8+ T cells (cells/μl), NK cells (cell/μl) and TBNK (T cells, B cells and NK cells, cells/μl) had the best performance with the average area under the curve (AUC) of 0.940. The RF model best predicted the patients who would progress into severe pneumonia, with the average AUC of 0.760. All the models had good performance validated by external data.Conclusions: The immune monitoring panel was tightly associated with pneumonia in kidney transplant recipients. The models developed by machine learning techniques identified patients at risk and predicted the prognosis. Based on the results of immune monitoring, better individualized therapy might be achieved.