The U.S. plans to sign an international agreement designed to govern the use of commercial spyware, the State Department said Thursday.