Encapsulation of specific enzymes in self-assembling protein cages is a hallmark of bacterial compartments that function as counterparts to eukaryotic organelles. The cage-forming enzyme lumazine synthase (LS) from (BsLS), for example, encapsulates riboflavin synthase (BsRS), enabling channeling of lumazine from the site of its generation to the site of its conversion to vitamin B Elucidating the molecular mechanisms underlying the assembly of these supramolecular complexes could help inform new approaches for metabolic engineering, nanotechnology, and drug delivery. To that end, we investigated a thermostable LS from (AaLS) and found that it also forms cage complexes with the cognate riboflavin synthase (AaRS) when both proteins are co-produced in the cytosol of A 12-amino acid-long peptide at the C terminus of AaRS serves as a specific localization sequence responsible for targeting the guest to the protein compartment. Sequence comparisons suggested that analogous peptide segments likely direct RS complexation by LS cages in other bacterial species. Covalent fusion of this peptide tag to heterologous guest molecules led to their internalization into AaLS assemblies both and, providing a firm foundation for creating tailored biomimetic nanocompartments for medical and biotechnological applications.