A substance produced by living organisms that is not essential to vital processes such as respiration, nutrition, and growth, but is produced for a particular purpose, often in response to environmental stresses. Examples include the antibiotics synthesized by certain bacteria, and the numerous defensive chemicals produced by plants to resist herbivores or insect pests (see alkaloid; coumarin; glycoside; tannin).