The Ogdoad are the eight Egyptian deities who formed the basis of creation mythology during the Middle Kingdom. The Ogdoad myth made up the second cosmological tradition and was developed at Hermopolis (Khmun), while the primary center of worship was at Heliopolis (though in other areas the Ogdoad were combined with other deities). The gods that made up the group of eight had very little mythical context outside of the creation, and were not personified in an in-depth way.
The gods were eight representations of primeval forces, which were combined into four male-female pairs. They were typically depicted as men with frog’s heads and women with snake’s heads, though sometimes they were shown as baboons heralding the sunrise. Each pair represented an aspect of the chaos from which the world was created.
Nun and Naunet represented the primordial seas. Nun was thought of as the father of Ra and continued to exist after the creation of the world as groundwater. Apep (the serpent demon) had been created when the goddess Nit spat into Nun. He was the 'Heart and the Tongue of the Ennead'. Naunet is more obscure than her partner, not so much a separate goddess, rather she was a feminine form of Nun. It was said that at the end of time, Nun would eventually inundate the entire world.
Kuk and Kauket represented the infinite darkness (or the illimitable and boundless).
Hu and Hauhet represented empty space, or infinity.
Amon and Amaunet represented invisible power, quintessence or the secret power of creation. Amon was called 'The Hidden One' and was an Egyptian sky god who was originally a local god of Khmun. Out of all the Ogdoad, only he maintained status as a deity. Amaunet was regarded as a tutelary deity of the Egyptian pharaohs and she had merged with the god Neith at the beginning of time.
Out of themselves and the chaos, the Ogdoad built an island or a mound in the middle of the primeval waters (or vast emptiness). They also created an egg which they then laid upon the mound ('The Island of Flame'). The egg itself was sometimes called invisible, or filled with air. According to some sources it was created before the mound and contained the bird of light (one aspect of the sun god). It was out of this egg that the young sun god, Atum, was born, and then the new god began the process of creating and shaping the world and everything in it. The old gods, having fulfilled their purpose, withdrew.
At Hermopolis it was thought that when the Ogdoad interacted, there was a great explosion and out of this explosion, 'The Island of Flame' was tossed. The island later became Hermopolis, and it was there that the sun god was first born. Hermopolis maintained (much like other creation centers) that its own cosmogony was the eldest and that all things had their beginnings there. They also claimed that a piece of the sun god’s egg was buried underneath one of their temples.
In another version of the myth, the egg from which the sun god was birthed was laid by Gengen Wer, the Primeval Goose, in the mound created by the Ogdoad.
From the Pyramid Texts:
"You have your offering-bread, O Niu and Nenet, you two protectors(?) of the gods
Who protect the gods with your shadow. You have your offering-bread, O Amun and
Amaunet, You two protectors(?) of the gods Who protect the gods with your shadow.
You have your offering-bread, O Atum and Ruti, Who yourselves created your
godheads and your persons. O Shu and Tefenet who made the gods, Who begot the
gods and established the gods..."