WASHINGTON — Before being confirmed as the director of the FBI, Kash Patel made clear his intent to remake it in his own image, reflecting a larger desire by the White House to bend the agency to its will.

“The FBI has become so thoroughly compromised that it will remain a threat to the people unless drastic measures are taken,” he wrote in his book “Government Gangsters,” asserting that the top ranks of the bureau should be eliminated.

Behind the scenes, his vision of an FBI under President Donald Trump is quietly taking shape. Agents have been forced out. Others have been demoted or put on leave with no explanation. And in an effort to hunt down the sources of news leaks, Patel is forcing employees to take polygraph tests.

Taken together, the moves are causing worrisome upheaval at the FBI, eliciting fear and uncertainty as Patel and his deputy, Dan Bongino, quickly restock senior ranks with agents and turn the agency’s attention to immigration. Their persistent claims that the bureau was politicized under previous directors, in addition to their swift actions against colleagues, have left employees to wonder whether they, too, will be ousted, either because they worked on an investigation vilified by Trump supporters or had ties to the previous administration.

The actions have obliterated decades of experience in national security and criminal matters at the FBI and raised questions about whether the agents taking over such critical posts have the institutional knowledge to pursue cornerstones of its work.

“The director and I will have most of our incoming reform teams in place by next week,” Bongino wrote on social media last week. “The hiring process can take a little bit of time, but we are approaching that finish line. This will help us both in doubling down on our reform agenda.”

He added that the agency would revisit past investigations, like the 2022 leak of a draft Supreme Court opinion on abortion, cocaine found two years ago at the White House and pipe bombs found near the Capitol on Jan. 6, 2021. (Two of the cases were not the FBI’s to start — the Secret Service investigated the cocaine and the Supreme Court marshal the leak of the draft opinion.)

“The director and I evaluated a number of cases of potential public corruption that, understandably, have garnered public interest,” Bongino said, oddly referring to the pipe bombs as a potential act of public corruption rather than domestic terrorism. In his previous role as a podcast host, he insisted, without offering evidence, that the pipe bombs were “an inside job” and that “the FBI knows who this person is.”

The FBI typically does not talk about investigations, and Bongino’s statement did little to dispel perceptions that he and Patel are eager to rehash years-old right-wing grievances by revisiting episodes that have angered conservatives aligned with the president. Their actions have fueled the same criticism they leveled at the bureau under the Biden administration: that the FBI is becoming weaponized.

This article is based on interviews with nearly a dozen current and former law enforcement officials who spoke on the condition of anonymity for fear of retaliation. The FBI, which typically does not respond to questions involving personnel, did not provide comment.

Former and current FBI officials warned that the attempts by Trump loyalists to mold the bureau to their worldview could ultimately have a chilling effect on agents seeking to open cases that could upset Trump or his base. They added that they viewed many of the personnel moves as retribution.

Patel and Bongino have sent a clear message on previous FBI investigations that focused on Trump or his allies. In essence, former officials said, nobody is above the law except Trump.

In recent weeks, the FBI disbanded the Washington field office’s elite federal public corruption squad, which was best known for investigating Trump’s efforts to overturn the 2020 election, among other sensitive inquiries involving prominent government officials.

The move, former and current agents say, suggests that investigations involving Trump could be out of bounds. Those extend to inquiries that might ensnare senior Trump officials who used the Signal messaging app to discuss highly sensitive details of military strikes on Yemen in advance. The platform is not an approved, secure means of communicating sensitive national defense information.

When new leaders take office, they inevitably want to put their own stamp on an agency. But some departures amount to a significant loss in expertise, including the abrupt retirement of an official running an office established in 2020 to uncover and reduce the risk of misuse of national security surveillance, arguably one of the bureau’s most important intelligence gathering tools. Others, including a recent round of forced retirements and transfers, veer from traditional processes, former officials said.

The bureau’s webpage detailing the agency’s leadership roles is in disarray, with employees who have left still listed as working there.

Patel has put other officials on administrative leave with pay, including two men who dealt with issues related to Hunter Biden’s laptop, which Republicans have long insisted shows evidence of politicalization. One of the men had already been disciplined for his work examining ties between Trump’s 2016 campaign and Russia before Patel took over as director.

“Anyone out there who thinks we have not taken appropriate action against political actors, you — they’re just making that up,” Bongino said on “Fox and Friends” last week. “We can’t go out and advertise this stuff.”

Addressing the broader challenge of overseeing the bureau, Bongino described the demands of making “big, bold changes.” “Part of you dies a little bit when you still see all this stuff from behind the scenes.”