Agni was descended from Visnu in this order:
Visnu – Brahma – Angiras – Brhaspati – Agni.
His birth according to Bhagavata and Mahabharata.
Angiras is one of the six mind-born sons of Brahma.
Angiras married Sraddha and got four daughters and two sons.
Brhaspati was one of the sons and Utatthya was the other.
The daughters were Sinivali, Kuhu, Raka and Anumati. (There is a mention of a third son named Samvarta in the Bhagavata)
Brhaspati married Candramasi and got six divine sons. Of these Samyu, the eldest, married Satya and Agni was born to Samyu of Satya.
(Slokas 1 to 4, Chapter 219, Aranya Kanda of Malayalam Mahabharata).
Agni – One of the Asta-dik-palakas.
(Asta=eight, dik=zone, palaka=guardian).
The Devi Bhagavata states in its eighth chapter that Agni is one of the eight guards posted at the eight different zones to protect the universe.
Indra guards the east; Agni, the southeast; Yama the south; Nirrti, the south-west; Varuna, the west; Vayu, the north-west; Kubera, the North and Siva, the north-east. The place where Agni sits on guard is known as tejovati.