Agar is a gelatinous substance derived from the cell walls of certain species of red algae, primarily from the genera Gelidium and Gracilaria. It is widely used as a culture medium in microbiology and as a thickening agent in food. It is not produced by bacteria, fungi, or viruses.