To comprehensively characterize the immune microenvironment in advanced biliary tract cancer (BTC), we utilized single-cell RNA sequencing in unselected viable cells from 16 matched samples, and identified nineteen cell subsets from a total of 45,851 cells, in which exhausted CD8+ T cells, macrophages, and dendritic cells (DCs) in BTC were shown to augment and communicate within the TME. This evidence concerns the gene CD8A and biliary tract cancer.