In order to solve problems including quantum threats, insufficient detection of abnormal visit, and bad adaptability of fixed strategies which traditional authentication and key agreement mechanisms encounter in open visit environments, this paper puts forward a post-quantum artificial intelligence-based key distribution and authentication agreement which is designed for new cryptographic schemes. According to ML-KEM, ML-DSA, or SLH-DSA, this protocol runs inside a cooperative structure that includes end points, gateway devices, auth servers, and one key management centre. It brings in risk-conscious mechanisms, authentication level promotion, and dynamic key re-production to realize pseudonym protection, two-way authentication, and safe session key building. Through the formal verification work, the prototype realization, and the repeated experiments on the expanded situations, the protocol’s security property, authentication effect, and AI-based risk controlling abilities have been comprehensively appraised. The outcomes show that the put-forward plan reaches a high interception proportion against common attack situations like replay, man-in-the-middle, spoofing, equipment cloning, and token stealing. The artificial intelligence danger calculation apparatus obtains an average AUC of 0.9720 and an F1 value of 0.9254, hence effectively raising the capacity to recognize abnormal visit behaviors. When put beside the ECC baseline scheme and the fixed-policy post-quantum scheme, this method obtains higher security gains and environment adaptive ability, although it brings restricted extra time lags, communication expenses and calculation cost.