Workers will have a say in the rollout of AI through an agreement between a tech giant and unions that has been welcomed by industry and government.