"Diplomatic immunity" means that ambassadors and other foreign government officials will not be held liable for violating the laws of the country where they work.
The big diplomatic immunity treaty is the Vienna Convention on Diplomatic Relations (500 U.N.T.S. 95). The Convention was made applicable to the U.S. by The Diplomatic Relations Act of 1978, codified in Chapter 6 of the Foreign Relations and Intercourse article of the United States Code (22 U.S.C. 251 et seq.).