When Phil Coulson, Leo Fitz, and Robbie Reyes were trapped in an interdimensional space between Earth and Hell, Melinda May was insistent that the key to rescuing them was in the Darkhold. She showed the book to Holden Radcliffe, who upon skimming for a few seconds, stopped reading the book, saying it was too much for the human brain handle. His android Aida was then tasked with reading the book, upon which she learned the means to create an Inter-Dimensional Gate to save Coulson and Fitz, and later Reyes, from being pulled into Hell.
However, the brief moment of scanning the book was enough to corrupt Radcliffe and, upon hearing May was going to retrieve Aida to help against Eli Morrow, gave Aida a specific command called Sunset Protocol.
Upon arriving, Melinda May was completely unaware of Aida's intentions, and the Life-Model Decoy was able to drug and knock out May. While unconscious, Aida kept the agent drugged as she programmed the Melinda May LMD with May's memories, so it would believe that it was the genuine Melinda May, and the two androids went to aid in stopping Eli Morrow.
This section requires expansion
The May LMD was initially unaware of her programming, but was set to grab the Darkhold for Radcliffe once the opportunity presented itself. Meanwhile, in order to keep May passive, Radcliffe and Aida worked on improving the Framework to keep her mind occupied from trying to escape the simulation and waking up.