An autonomous wavefront sensing and control software suite (APRC) has been developed as a method to calibrate the internal static errors in the Palomar Adaptive Optics system. An image-based wavefront sensing algorithm, Adaptive Modified Gerchberg-Saxton Phase Retrieval (MGS), provides wavefront error knowledge upon which actuator command voltages are calculated for iterative wavefront control corrections. This automated, precise calibration eliminates non-common path error to significantly reduce AO system internal error to the controllable limit of existing hardware, or can be commanded to prescribed polynomials to facilitate high contrast astronomy. System diagnostics may be performed through analysis of the wavefront result generated by the phase retrieval software.© (2008) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.