I don't believe that Agnes was ever really a Star Fleet Officer.
(I also don't remember that being said in the show?)
She is more like Prime Dr. Carol Marcus, a trained Scientist working with/for Star Fleet and assigned to Maddox and his project.
In the first episode she said that Maddox "recruited her from Starfleet" and in the tie-in prequel novel (The Last Best Hope), we learn that she was a medical doctor in Starfleet before doing her cybernetics doctorate at Daystrom under Dr Maddox.