Plants are prolific producers of defensive chemicals, which they use to protect against herbivores and pathogens. Compounds like alkaloids, tannins, and essential oils serve as deterrents or toxins. Some plants release volatile organic compounds to attract predators of their herbivores, creating an indirect defense mechanism known as tri-trophic interaction.