Agni is one of the panchamahabhoota. It has a peculiar characteristic that it can not exist without any base i.e. it require some matter for its existence, for example - coal, kerosene etc., are the matters in which agni (fire) exists. Likewise, in the body it exists in pitta dosha.
Agni is responsible for the functions like digestion, vision, heat, complexion, prowess, anger, thoughts, etc.