This page contains spoilers for the following products: Curse of the Lady's Light.
Source: Demons Revisited, pg(s). 56
Ayandamahla was first conjured by Sorshen just before the runelords gathered to discuss the removal of Emperor Xin; Sorshen was expecting to be betrayed and promised Ayandamahla a week of freedom in Eurythnia if she were to aid her against such betrayals. The only person being betrayed that night was Xin, however, but Sorshen kept her promise. Ayandamahla was made the steward of the Lady's Light, and for the rest of the Age of Legend she served Sorshen in numerous other capacities, guarded the Shard of Lust, and aided her research in the relationship between immortality and blood.
Sorshen learnt about the upcoming Earthfall and end of Thassilon and, before retreating into the Eye of Desire, she bound Ayandamahla into the Lady's Light, preventing the succubus from leaving until she returned. Furious at both Sorshen and herself for being tricked, Ayandamahla magically protected the Lady's Light as Earthfall devastated Thassilon; she grew increasingly frustrated at what she considered to be imprisonment on a dying Golarion. When she eventually discovered a fault in Sorshen's magic that allowed one of her blood relatives to take her place, Ayandamahla duped her alu-demon daughter Ashamintallu into doing so, allowing Ayandamahla to return to the Abyss.