This lecture discusses the integration of scanning probe microscopy (SPM) with machine learning to enhance automated workflows. The instructor outlines the challenges faced in SPM, including the need for universal interface libraries and high computational power. Key tasks that benefit from automation, such as optimizing scanning parameters and measuring specific features, are highlighted. The lecture presents workflows that utilize machine learning algorithms for real-time optimization and feature extraction, demonstrating how these techniques can significantly improve efficiency and accuracy in SPM operations. The instructor emphasizes the importance of defining reward functions to guide the machine learning processes and discusses the potential for active learning to refine models based on new data. Additionally, the lecture explores the role of human operators in the automation process, advocating for a collaborative approach between AI and human expertise. The session concludes with insights into future developments in automated microscopy and the importance of community collaboration in advancing these technologies.