The proliferating development of optical networks has broadened the network scope and caused a corresponding rise in equipment deployment. This growth potentially results in a significant number of alarms in the case of equipment malfunctions or broken fiber. Managing these alarms efficiently and accurately has always been a critical concern within the research and industry community. The alarm processing workflow typically includes filtration, analysis, and diagnostic stages. In current optical networks, these procedures are often performed by experienced engineers, utilizing their expert knowledge and extensive experience. This method requires considerable human resources and time, as well as demanding proficiency prerequisites. To address this issue, we propose an intelligent alarm analysis assistant, “AlarmGPT,” for optical networks, utilizing a generative pre-trained transformer (GPT) and LangChain. The proposed AlarmGPT exhibits a high level of semantic comprehension and contextual awareness of alarm data, significantly enhancing the model’s ability of interpreting, classifying, and solving alarm events. Through verification of extensive alarm data collected from real optical transport networks (OTNs), the usability of AlarmGPT has been validated in the tasks of alarm knowledge Q&A, alarm compression, alarm priority analysis, and alarm diagnosis. This method has the potential to significantly reduce the labor and time required for alarm processing, while also lowering the experiential requisites incumbent upon network operators.