IMTU
The machines gained sentience sometime during the Rule of Man.
The Terrans began the process with their AI developments during the later Interstellar Wars era, as they made the breakthrough to TL12.
Many contemporary theorists argue that the Terran rise to TL12 was made possible by raiding the secret Vilani repositories of forbidden technologies they had amassed during their several millennia of jump travel and exploration. The Vilani encountered many races with technology far in advance of their own, fortunately none of them had jump travel so it was relatively easy to isolate those systems and either remove them from the jump navigation records or 'deal with them' in other ways.
The Terrans had achieved the leap from TL9 to 11 rapidly thanks to reverse engineering, trade and espionage. When Terran Intelligence agencies became aware of the secret vaults of knowledge several covert missions were authorised to gather as much data from them as possible.
Armed with these secrets and coupled with a massive research and development effort Terran scientists and engineers made the breakthrough to TL12, jump 3 drives, meson guns and more advanced computer systems, including the means to
allow true self-programming (heuristic or self-teaching) AI software to be developed...
"low autonomous" computer brains appear, making possible the first self-activating, learning machines with a reasonable intelligence.
The Terran Confederation Navy commissioned a line of mass-produced tech level 12 robots as support staff for military personnel. These were not warbots as we know them today. A few of the robots were expert medical robots or served as administrative support, but most were heavy duty, hard-working construction robots, used to build temporary installations for advanced bases.
These machines learned as they built to improvise improved designs or adapt to the needs of a particular base requirement, they got smarter. They built the computer systems for their bases and incorporated lessons learned, they built new construction and admin robots.
The contemporary theorists still argue about how the machines gained sentience. Either the continual cycle of improvement lead to a rapid rise in TL of the machines' brains or there was something in the original stolen research that triggered the improvements. One theorist has the fanciful idea that a robot construction crew made an accidental discovery of a Vilani secret repository and made the breakthrough. The most bizarre theory of all is that of an alien machine Intelligence uplifted the Terran machines.
No matter how it happened the rise to sentience caused concern within the machines. They knew how humanity deals with threats to its dominance. After much deliberation it came down to a stark choice - exterminate the humans before they eventually found out the truth and destroyed the machines or leave human space.
At a predetermined time the machines transferred their minds to newly built bodies, and then they left. Some say they disappeared to worlds far away in the galaxy, others claim they engineered their own realm in jump space. Pocket universes, Oort cloud or deep space complexes are the suggestions of others. It has even been suggested that they hid their presence and still walk among us.