The United States and China agreed to establish a formal artificial intelligence dialogue and emergency communications channel to defuse potential incidents amid escalating technological competition.