From ChatGPT
The President does not have the authority to directly impose a military takeover of investigations for the 3 letter agencies, as this would be a violation of the principle of civilian control over the military.
However, there is a provision under which the President can authorize the use of military personnel to support civilian law enforcement agencies in certain circumstances. This provision is known as the Insurrection Act, which is codified in 10 U.S. Code § 252.
Under the Insurrection Act, the President can deploy the military to suppress insurrections, rebellions, and domestic violence. The Act authorizes the use of military force in cases where state authorities are unable or unwilling to suppress the violence themselves.
The conditions that must be present for the President to use the Insurrection Act include a request from a state legislature or governor for federal assistance, or a finding by the President that the situation is beyond the control of state authorities and that federal intervention is necessary to protect life and property.
It is important to note that the use of military force in domestic law enforcement is a serious matter that should be exercised only in the most extreme circumstances and with careful consideration of the potential consequences.