Donald Trump has attacked his own FBI in a series of tweets, saying the law enforcement agency's reputation is "in Tatters - worst in History!"

The US president fired off a string off early morning tweets following reports that a veteran FBI counterintelligence agent was removed from special counsel Robert Mueller's team investigating Russian election meddling because of anti-Trump text messages.

He tweeted "we will bring it (the FBI) back to greatness."

Trump said after years under fired FBI director James Comey “with the phony and dishonest Clinton investigation (and more),” the agency’s reputation “is in Tatters – worst in History!”

The president also retweeted a tweet suggesting FBI Director Chris Wray “needs to clean house.”

The president said earlier he never asked Comey to stop investigation ex-national security adviser Michael Flynn.