Prior to joining The Resistance, and taking the red pill, Randi was seldom noticed by the Agents, until being contacted by The Resistance, recruited as a fellow redpill, and no longer a bluepill. Smith had his eyes on her ever since her redpill transition, discreetly stalking her in The Matrix.
The longer Randi was part of The Resistance, the more alienated she felt when being around her fellow human colleagues. Overtime, she grew to detest humanity, despite being a human herself, and ultimately sided with the Agents. In secret, she made a fateful bargain with Smith, promising loyalty.
With Randi offering her utter loyalty, and devotion towards Smith, Smith in return would reciprocate that loyalty through protection, and companionship. With such a hefty bargain; the deal was set in stone, and she would take full advantage of the power, and control she gained over the Agents.
Both Randi, and Smith wish to be freed from their own prisons that were set up by their respective factions, with the intent of becoming players who are entirely independent from the ongoing humans VS machines conflict. Randi greatly relates, and even empathizes with Smith's distaste for humanity.
In Smith's ideal world where everyone would become copies of himself, Randi is the only person who is spared from his assimilation, seeing as how she is the only one who Smith is genuinely able to relate to, and vouch for. Smith sees parts of Randi as a reflection of himself in some regard.