Ages ago, a prince named Chadravarma was worshiping Goddess Parvathy on Brahmagiri hills. Parvathy promised him telling that she would appear in the form of a river for the benefit of humanity.
During the churning of the Kshirasagar by the gods and Rakshasas, “Amrita” was seized by Rakshasas. In order to grab Amritha from Rakshasas, Lord Vishnu incarnated himself as Mohini and with the help of Lopamudra (Parvathy) they were successful in restoring the amrutha to Devas. Later Mohini changed herself into a cave in Brahmagiri and Lopamudra was looked after by Brahma as his own daughter.
Lopamudra to Kaveri!
A great Sage named ‘Kavera’ was performing a Thapas/Meditation to please Lord Brahma for a child. Impressed by his prayer, Lord Brahma gave his daughter Lopamudra to Kavera, after which she gained a new name Kaveri.
One day when Kaveri was meditating on Brahmagiri hill, a sage called ‘Agastya’ met her and asked her to marry him. Kaveri agreed to marry him on one condition, telling that she should never be left alone. Agastya agreed to this condition and married her.
As days passed…, one day when Agastya wanted to take bath in a nearby river, he left Kaveri in his Kamandala and asked his disciple to keep a watch on her. When Agastya broke the pledge of never leaving her alone, Kaveri plunged into the pond and flowed out as a stream, sank into the earth and flowed underground as guptagamini and joined Kanike and Sujyothi.