National legislatures have a key role in charting the course for artificial intelligence (AI) and assuring cyber-security going forward, according to a statement agreed by representatives from the Group of Seven (G7) countries at the close of a summit in Italy.