Klebsiella pneumoniae provides influential prototypes for lipopolysaccharide O antigen (OPS) biosynthesis in Gram-negative bacteria. Sequences of OPS-biosynthesis gene clusters in serotypes O4 and O7 suggest fundamental differences in the organization of required enzyme modules compared to other serotypes. Furthermore, some required activities were not assigned by homology shared with characterized enzymes. The goal of this study was therefore to resolve the serotype O4 and O7 pathways, to expand our broader understanding of glycan polymerization and chain termination processes. The O4 and O7 antigens were produced from cloned genetic loci in recombinant Escherichia coli. Systematic in vivo and in vitro approaches were then applied to assign each enzyme in each of the pathways, defining the necessary components for polymerization and chain termination. OPS assembly is accomplished by multiprotein complexes formed by interactions between polymerase components variably distributed in single and multi-module proteins. In each complex, a terminator function is present in a protein containing a characteristic coiled-coil molecular ruler, which determines glycan chain-length. In serotype O4, we discovered a CMP-α-3-deoxy-ᴅ-manno-octulosonic acid (Kdo)-dependent chain-terminating glycosyltransferase that is the founding member of a new glycosyltransferase family (GT137), and potentially identifies a new glycosyltransferase fold. The O7 OPS is terminated by a methylphosphate moiety, like the K. pneumoniae O3 antigen, but the methyltransferase-kinase enzyme pairs responsible for termination in these serotypes differ in sequence and predicted structures. Together, the characterization of O4 and O7 has established unique enzyme activities and provided new insight into glycan-assembly strategies that are widely distributed in bacteria.