“Upanishads
Agni holds a prominent place in the principal and secondary Upanishads — another set of sacred Hindu scriptures. Among the earliest mentions is the legend of a boy named Satyakama, born to an unmarried mother. In chapter 4 of the Chandogya Upanishad (around 700 BCE), he admits his poverty and the fact that his mother does not know who his father was. This honesty earns him a place in a Vedic school (gurukula). During his studies, the boy encounters Agni, who then becomes for him the primary direction, the cosmic body, the eye and knowledge, as well as the abstract Brahman, which, according to the Upanishad, is in everything and everywhere. Agni also appears in section 1.13 of the Chandogya Upanishad.
In verse 18 of the Isha Upanishad, Agni is addressed with the words: “O Agni, you know all the paths, lead me to success by the good path, keep me from the wrong path of sin.” In sections 4.5–6 of the Maitri Upanishad, disciples ask their guru (teacher) which god is the greatest among the gods they name, and Agni is included in this list. The guru replies that all of them are supreme, all are merely forms of Brahman, the whole world is Brahman. He suggests choosing any one, meditating and worshipping him, then meditating on all of them, and then denying the individuality of each of these gods, including Agni, thus merging with the one Brahman, Purusha.
Sections 3 and 4 of the Kena Upanishad, another major ancient Upanishad, present an allegorical story involving the gods Agni, Vayu, Indra, and the goddess Uma. After a battle between the good gods and evil demons, in which Brahman helps good to triumph, the gods ask themselves: “What is this Brahman, this wondrous being?” Agni goes first in search of the answer but fails. Vayu also does not find the answer. Then comes Indra’s turn, and he meets a goddess who already understands Brahman; she explains what Brahman is and how good achieved victory through Him. Indra shares this knowledge with Agni and Vayu. The Kena Upanishad concludes these sections by stating that Agni, Vayu, and Indra are revered more than the others because they were the first among the devas to realize Brahman. The legend, according to Paul Deussen, is intended to teach that all Vedic gods and natural phenomena have their foundation in the timeless universal monistic principle called Brahman.