In Hinduism, Agni or fire is worshiped in all rituals like havans, yagnas, ahutis, sankalp or seven pheras of walking around the sacred fire in any wedding.
Externally the fire burns and converts any matter into an ash or bhasma. Ash is the essence, purest form and once formed contains no trace of original matter.
Internally, Agni symbolizes burning of all negative desires, expectations, ego and anger in the fire of knowledge by surrendering ego and egocentric desires into the fire of knowledge or spontaneously let it burn in meditation. The result is a pure mind devoid of negative thoughts and desires. Only a purified mind is able to meditate because while prayer is talking to God, meditation is listening to God. Meditation is the path to self-realization and controlling anger, greed and other negative tendencies.
In the Kathopanishad, in a conversation, Yama taught the importance of internal fire or internal churning and called it Nicheketa fire.
The internal Yagna thus is the churning of any information in the fire of knowledge and converting it to wisdom. Adopt the essence and implement it in day to day life to achieve self-realization. Once knowledge has been converted into wisdom it is of no use unless it is made use of in day to day practice.
Burning of all our thoughts, desires and expectations in the fire of knowledge or agni and accepting the resultant ash is the mantra.