US president Donald Trump has said "it's a shame what's happened" with the FBI, saying the agency's handling of the Hillary Clinton email investigation was "really disgraceful".

He spoke as he departed the White House for a speech at the FBI training academy in Quantico, Virginia.

It was an hour after an aide said newly revealed FBI records show there is "extreme bias" against him among senior leadership at the FBI.

Mr Trump, who has described the agency as "in tatters", is to speak at a ceremony at the FBI campus for law enforcement leaders graduating from a programme aimed at raising standards.

He told reporters that "we're going to rebuild the FBI".

White House deputy press secretary Hogan Gidley told Fox News Channel that edits to former FBI director James Comey's statement on Hillary Clinton's private email server and text messages from a top agent critical of Mr Trump are "deeply troubling".

"There is extreme bias against this president with high-up members of the team there at the FBI who were investigating Hillary Clinton at the time," he said.

File photos of Hillary Clinton and Donald Trump, as tens of millions of Americans are preparing to cast their votes to decide which of them will be the next president of the United States. PRESS ASSOCIATION Photo. Issue date: Sunday November 6, 2016. See PA story POLITICS President. Photo credit should read: PA Wire

Special counsel Robert Mueller is pushing on with a probe of possible Trump campaign ties to Russia.

Mr Gidley said Mr Trump maintains confidence in the FBI's rank-and-file.

Edits to the Comey draft appeared to soften the gravity of the bureau's finding in its 2016 investigation of Mrs Clinton's use of a private email server while secretary of state.

"It is very sad when you look at those documents, how they've done that is really, really disgraceful, and you have a lot of really angry people who are seeing it," Mr Trump said of the document.

Mr Gidley said the disclosure of politically charged text messages sent by one of the agents on the Clinton case, Peter Strzok, were "eye-opening".

Mr Strzok, who was in the room as Mrs Clinton was interviewed, was later assigned to Mr Mueller's team to investigate potential coordination between Russia and the Trump campaign.

He was re-assigned after the messages were uncovered this summer.

About 200 leaders in law enforcement from around the country have attended the FBI National Academy programme aimed at raising standards and cooperation.

Coursework included intelligence theory, terrorism and terrorist mindsets, law, behavioural science, law enforcement communication, and forensic science.