Agave Fruit is obtained by harvesting sufficiently grown wild Agave Plants, which can be found in dry biomes (i.e. Arid Shrubland & Desert, but not Extreme Desert). Agave Fruit can also be found in cargo pods in the same quantities that Rice and Corn can be found in.
Agave Fruit gives a negative moodlet when consumed in its raw form; therefore it should ideally be cooked before consumption, or at least made into Nutrient Paste. It also has the same market value as Corn, so it's better to sell than Rice.