The purpose of the Sergeant at Arms is to maintain order during legislative proceedings and ensure that all parties present follow protocol. This role includes law enforcement responsibilities for the buildings in which the legislative body's meeting takes place, as well as ensuring security for those meetings.
In addition to maintaining order in the galleries during meetings, the Sergeant at Arms is also responsible for providing escort services to executive branch leaders attending functions in the legislative building. One of the more ceremonial functions may involve keeping custody of the legislative body's gavel, depending on the rules.
In the modern age, some bodies have given their Sergeant at Arms expanded administrative responsibilities beyond security in the room. For example, in the U.S. Senate, the Sergeant at Arms is responsible for technology support services and computers in the Senate, as well as photographic and recording services, graphics, printing services and all telecommunications. Mailing, staffing and purchasing needs for Senate offices can also go through the Sergeant at Arms. The Sergeant at Arms' office also has joint responsibility for the Senate Page Program, the U.S. Capitol Police, the Capitol Guide Service, the Capitol Switchboard, and the Senate Office of Education and Training.