European Union reaches agreement on landmark legislation to regulate AI