The applications of artificial intelligence (AI) open up numerous prospects for the progress of humanity and the achievement of the Sustainable Development Goals (SDGs). AI could help government officials, such as policymakers and civil servants, to accelerate the achievement of an inclusive future based on rights and equity. However, governments must be equipped with the right attitudes and skills to leverage digital transformation for the good of their constituents and mitigate the negative effects of AI. This article aims to establish the digital transformation priorities and capacity building needs of governments, based on an AI needs assessment survey of 32 African countries. The thirty-two African countries that responded to the survey requested UNESCO’s support to build human and institutional capacity in AI-related areas. Stimulated by national demand for digital capacity building interventions within governments, UNESCO developed the AI and Digital Transformation Competency Framework.The AI and Digital Transformation Competency Framework outlines the skills civil servants need to drive digital transformation and digital governance in government. Challenges, such as work cultures that are reluctant to experiment and innovate, lack of investment in IT infrastructure and low investment in digital skills, are preventing government institutions from embarking on the digital transformation journey. This framework therefore proposes three competency domains with several interlocking competencies and nine recommendations to help countries overcome these obstacles and seize the opportunities of digital transformation.