Emad Salem, a former Egyptian army officer, was getting paid $500 a week for his work with the FBI, but he was a private citizen agreeing to work as a pure intelligence asset. This meant that his agreement with the FBI stipulated that he would never have to testify in open court or wear a wire. He was recruited by an agent named Nancy Floyd. She prepped him and worked with him through the first few months of his assignment. Salem stopped working for the FBI when his new handler, agent John Anticev, tried to go back on his original agreement and force him to wear a wire and testify in open court. Salem, afraid for his family's lives once the plot's mastermind, Sheik Omar Abdel Rahman, discovered he was a mole, refused. Salem stopped attending Rahman's mosque in Brooklyn, where he'd made contact with the cell, in July 1992, seven months before the bombing. Ramzi Yousef was then brought to New York from Pakistan in September 2002 to replace Salem, who Rahman thought would be building the bomb. Without Salem in the inner circle, the FBI had no details about when the bombing would take place or where the bomb was being put together.
After the bombing, Salem contacted the FBI and told them that bombing co-conspirator Mahmoud Abouhalima had fled to Egypt, leading to his capture. Soon after, Salem informed that the FBI that another bombing plot was being planned by Rahman. Salem was paid a lump sum of $1.5 million to re-infiltrate the cell. Salem tape recorded all of his negotiations with the FBI since he no longer trusted them after their earlier treatment of him and agent Floyd. Thanks to Salem's information, Rahman and his co-conspirators were arrested before the attacks could occur. Salem was the key witness for the prosecution's case and he and his family have been in the Witness Protection Program ever since.
The FBI has never been implicated in the attack. The incompetence of upper management is certainly a huge issue in the case but that's an entirely different story.