This chapter of the Satapatha Brahmana of the Yajur Veda describes how the ancient king Videha Madhava founded the kingdom of Videha, the kingdom that Sita's father Janaka later ruled. Once Videha Madhava had Agni the fire god inside his mouth, and he didn't want to speak for fear of letting him out. But the sage Gautama, who was the guru of Videha Madhava, knowing that Agni was there kept reciting Vedic hymns in praise of Agni, and that triggered Agni to come out and create a massive fire that spread east from the Saraswati river until it reached the Sadanira river:
Now Mâthava, the (king of) Videgha, carried Agni Vaisvânara in his mouth. The Rishi Gotama Râhûgana was his family priest. When addressed (by the latter), he made no answer to him, fearing lest Agni might fall from his mouth. He (the priest) began to invoke the latter with verses of the Rig-veda, 'We kindle thee at the sacrifice, O wise Agni, thee the radiant, the mighty caller to the sacrificial feast (Rig-veda V, 26, 3)!--O Videgha!' He (the king) did not answer. (The priest went on), 'Upwards, O Agni, dart thy brilliant, shining rays, thy flames, thy beams (Rig-veda VIII, 44, 16)!--O Videgha-a-a!' Still he did not answer. (The priest continued), 'Thee, O butter-sprinkled one, we invoke! (Rig-veda V, 26, 2);' so much he uttered, when at the very mentioning of butter, Agni Vaisvânara flashed forth from the (king's) mouth: he was unable to hold him back; he issued from his mouth, and fell down on this earth.
Mâthava, the Videgha, was at that time on the (river) Sarasvatî. He (Agni) thence went burning along this earth towards the east; and Gotama Râhûgana and the Videgha Mâthava followed after him as he was burning along. He burnt over (dried up) all these rivers. Now that (river), which is called 'Sadânîrâ,' flows from the northern (Himâlaya) mountain: that one he did not burn over. That one the Brâhmans did not cross in former times, thinking, 'it has not been burnt over by Agni Vaisvânara.' Now-a-days, however, there are many Brâhmans to the east of it. At that time it (the land east of the Sadânîrâ) was very uncultivated, very marshy, because it had not been tasted by Agni Vaisvânara.
Now-a-days, however, it is very cultivated, for the Brâhmans have caused (Agni) to taste it through sacrifices. Even in late summer that (river), as it were, rages along: so cold is it, not having been burnt over by Agni Vaisvânara. Mâthava, the Videgha, then said (to Agni), 'Where am I to abide?' 'To the east of this (river) be thy abode!' said he. Even now this (river) forms the boundary of the Kosalas and Videhas; for these are the Mâthavas (or descendants of Mâthava). Gotama Râhûgana then said (to Mâthava), 'Why didst thou not answer when addressed by us?' He replied, 'Agni Vaisvânara was in my mouth; I did not reply, lest he should escape from my mouth.' 'How then did this happen?'--'At the moment when thou didst utter the words, "(Thee), O butter-sprinkled one, we invoke!" just then, at the mention of butter, Agni Vaisvânara flashed forth from my mouth; I was unable to hold him back, he issued from my mouth.'
And indeed, in ancient times the kingdom of Videha lay east of the Sadanira river, the modern-day Gandaki river in Nepal.
But my question is, why was Agni inside Videha Madhava's mouth in the first place? Did he intentionally enter Videha Madhava's mouth to make him found the kingdom of Videha? Was Videha Madhava's some kind of Yogi who would regularly have fire in his mouth for some reason, or was this just a one-incident?
By the way, Western Indologists speculate that Agni symbolizes here the force of civilization which drove the Vedic people eastward across India. But I'm interested in what Hindu scripture has to say. Is this story discussed in any Puranas?