Pathogenic bioaerosols are critical for outbreaks of airborne disease; however, rapidly and accurately identifying pathogens directly from complex air environments remains highly challenging. We present an advanced method that combines open-set deep learning (OSDL) with single-cell Raman spectroscopy to identify pathogens in real-world air containing diverse unknown indigenous bacteria that cannot be fully included in training sets. To test and further enhance identification, we constructed the Raman datasets of aerosolized bacteria. Through optimizing OSDL algorithms and training strategies, Raman-OSDL achieves 93% accuracy for five target airborne pathogens, 84% accuracy for untrained air bacteria, and 36% reduction in false positive rates compared to conventional close-set algorithms. It offers a high detection sensitivity down to 1:1000. When applied to real air containing >4600 bacterial species, our method accurately identifies single or multiple pathogens simultaneously within an hour. This single-cell tool advances rapidly surveilling pathogens in complex environments to prevent infection transmission.