Purpose: The purpose of this work is to employ projected gradient and grassfire algorithms for automated conformal inverse planning on Gamma Knife⃝R PerfexionTM (PFX). Methods: We approach the PFX treatment planning problem using a mathematical framework similar to that used for intensity modulated radiation therapy (IMRT). We first use a hybrid grass- fire and sphere-packing algorithm to obtain shot positions (isocentres) based on target geometry. On the selected isocentres, we then employ a sector duration optimization (SDO) model to opti- mize the duration of radiation delivery from each collimator size from each individual source bank. The SDO model is solved using projected gradient algorithm. We apply our methods to six clinical cases to assess the quality of treatments developed using this approach. Results: For the clinical cases tested, our approach obtains high quality, conformal radiosurgery treatments. Classic and paddick conformity indices range from 0.79 to 0.94 and 1.01 to 1.22, respectively. In all the plans V100 is larger than 99.65, and the brainstem in all the cases received less than 15Gy max dose. All our treatment plans were obtained in a clinically feasible amount of time. Conclusions: PFX inverse planning can be performed using geometric isocentre selection and mathematical modeling and optimization techniques. The obtained treatment plans all meet or exceed clinical guidelines while displaying high conformity.