Not an agent of any kind, but a federal government employee who's "worked" at many different agencies.
Weapons are not allowed in government buildings. Neither by staff nor visitors unless they are LEO. There is no system I've seen for holding items at the entrance until you leave.
However - not all buildings are the same, and not all agencies are anal retentive about this. Here's some extremes.
US Fish and Wildlife Regional HQ in Hadley, MA does not have guards, metal detectors or any of that BS except signs saying "No Berettas". The guy who checks you in looks at your ID, but has no training to determine if it is a real ID or not, and really doesn't care. Carry whatever you want, no one gives a crap.
US Citizenship and Immigration Services on the other hand are usually in federal courthouses, and have all the bells and whistles to go with it. Metal detectors, security guards, Federal Protective Services upstairs if shit gets really real, etc. Leave it in the car, they care.
Military bases will check your car, but not your person (usually). Knives are fine, guns aren't. Concealed is concealed.
Springfield Armory Museum has a metal detector, but no one cares. I've never been told anything other than "don't worry about it" when the machine goes off.
Best bet is to just leave it in your vehicle and retrieve it when you're done.