Genetic exchange mediated by viruses of bacteria (bacteriophages) is the primary driver of rapid bacterial evolution. The priority of viruses is usually to propagate themselves. Most bacteriophages use the small terminase protein to identify their own genome and direct its inclusion into phage capsids. Gene transfer agents (GTAs) are descended from bacteriophages but they instead package fragments of the entire bacterial genome without preference for their own genes. GTAs don’t selectively target specific DNA and no GTA small terminases are known. Here, we identified the small terminase from the model Rhodobacter capsulatus GTA, which then allowed prediction of analogues in other species. We examined the role of the small terminase in GTA production and propose a structural basis for random DNA packaging.