It would be "an" before FBI (an FBI investigation, an FBI agent), because FBI is pronounced "eff-bee-eye."
The indefinite article an is used whenever the following spoken sound is a vowel sound, or is very similar to one, notably H sounds. (The word historical is one of several words that may use either a or an.)
When you use FBI as a noun, it is neither of the above, and you'd say, "the FBI". The FBI is a specific government agency and not countable. So it is "the FBI" unless you are using FBI as an adjective, then the above rules would apply.
Examples:
John is an FBI agent.
John works for the FBI.