Bacterial small molecule metabolites such as adenosine-diphosphate-d-glycero-β-d-manno-heptose (ADP-heptose) and their derivatives act as effective innate immune agonists in mammals. We show that functional nucleotide-diphosphate-heptose biosynthetic enzymes (HBEs) are distributed widely in bacteria, archaea, eukaryotes, and viruses. We identified a conserved STTR5 motif as a hallmark of heptose nucleotidyltransferases that can synthesize not only ADP-heptose but also cytidine-diphosphate (CDP)- and uridine-diphosphate (UDP)-heptose. Both CDP- and UDP-heptoses are agonists that trigger stronger alpha-protein kinase 1 (ALPK1)-dependent immune responses than ADP-heptose in human and mouse cells and mice. We also produced ADP-heptose in archaea and verified its innate immune agonist functions. Hence, the β-d-manno-heptoses are cross-kingdom, small-molecule, pathogen-associated molecular patterns that activate the ALPK1-dependent innate immune signaling cascade.