These molecules are signaling peptides: they act as agonists at incretin and related receptors that influence glucose handling and appetite signaling. The newer molecules differ mainly in which receptors they activate and how strongly and durably they bind.
A frequent misconception is that they are tiny 4–8 amino-acid peptides. They are not — they are modified peptides of ~31–39 amino acids with a fatty-acid chain. The “generations” differ by sequence, lipid modification and receptor targets, not by length.