EU agrees landmark rules on artificial intelligence