Agapanthus and allium are from two different botanical families. Although both belong to the order Amaryllidaceae, agapanthus is a member of the African lily family, or Agapanthoideae, while allium species belong to the widespread onion family, or Allioideae.
Both lily of the Nile and garden allium, like the popular Globemaster, (Allium cristophii x macleanii Globemaster, or Allium giganteum Globemaster) produce showy clusters of lavender flowers on 2- to 3-feet tall spikes. They also produce their blooms in summer and are not North American natives, although other members of the allium family are natives.
Plants in the allium family produce bulbs. Onions and garlic are both members of the allium family, and the bulbs of garden allium have a distinctive onion-like smell. Agapanthus plants, however, produce thickened rhizomes and not true bulbs. Agapanthus plants are not cold-hardy, unlike allium, and take damage when temperatures drop below 28 degrees Fahrenheit.