In atomic force microscopy (AFM), the exchange and alignment of the AFM cantilever with respect to the optical beam and position-sensitive detector (PSD) are often performed manually. This process is tedious and time-consuming and sometimes damages the cantilever or tip. To increase the throughput of AFM in industrial applications, the ability to automatically exchange and align the cantilever in a very short time with sufficient accuracy is required. In this paper, we present the development of an automated cantilever exchange and optical alignment instrument. We present an experimental proof of principle by exchanging various types of AFM cantilevers in 6 seconds with an accuracy better than 2 um. The exchange and alignment unit is miniaturized to allow for integration in a parallel AFM. The reliability of the demonstrator has also been evaluated. Ten thousand continuous exchange and alignment cycles were performed without failure. The automated exchange and alignment of the AFM cantilever overcome a large hurdle toward bringing AFM into high-volume manufacturing and industrial applications.