Background: The current healthcare system is unsatisfactory for the management of high-incidence diseases, such as cataract, due to inadequate medical resources and limited accessibility. Artificial intelligence (AI) holds great promise but remains to be improved to integrate it into primary healthcare services for increased patient coverage. The goals of this study were to establish and validate a universal AI platform for the collaborative management of cataracts involving multilevel clinical scenarios and to explore an AI-based medical referral pattern to improve collaborative efficiency and resource coverage. Methods: The training and validation datasets were derived from the Chinese Medical Alliance for Artificial Intelligence (CMAAI), covering multilevel healthcare facilities and capture modes. The datasets were labeled using a three-step strategy: (1) capture mode recognition; (2) cataract diagnosis as a normal lens, cataract or a postoperative eye; and (3) detection of referable cataracts with respect to etiology and severity. Moreover, we integrated the cataract AI agent with a real-world multilevel referral pattern involving self-monitoring at home, primary healthcare, and specialized hospital services. Findings: The universal AI platform and multilevel collaborative pattern showed robust diagnostic performance in three-step tasks: (1) capture mode recognition (AUC 99.28%-99.71%), (2) cataract diagnosis (normal lens, cataract or postoperative eye with AUCs of 99.82%, 99.96%, and 99.93% for mydriatic-slit lamp mode and AUCs >99% for other capture modes), and (3) detection of referable cataracts (AUCs>91% in all tests). In the real-world tertiary referral pattern, the agent suggested 30.3% of people be referred, substantially increasing the ophthalmologist-to-population service ratio by 10.2-fold compared to the traditional pattern. Interpretation The universal AI platform and multilevel collaborative pattern showed robust diagnostic performance and effective service for cataracts. The context of our AI-based medical referral pattern will be extended to other common disease conditions and resource-intensive situations to provide cost-effective health care for an increasing number of patients. Trial Registration Number: This study was registered with ClinicalTrials.gov (identifier: NCT03623971). Funding Statement: This study was supported by the National Key Research and Development Program (2018YFC0116500), the Key Research Plan for the National Natural Science Foundation of China in Cultivation Project (91546101), the Science Foundation of China for Excellent Young Scientists (8182200130), the Guangdong Provincial Natural Science Foundation for Distinguished Young Scholars of China (2014A030306030), the Guangdong Province Universities and Colleges Youth Pearl River Scholar Funded Scheme (Haotian Lin), the National Natural Science Foundation of China (81800810), the Natural Science Foundation of Guangdong Province (2018A030310104), the Science and Technology Planning Projects of Guangdong Province (2017B030314025), the Clinical Research and Translational Medical Center of Pediatric Cataract in Guangzhou City (201505032017516), the Outstanding Young Teacher Cultivation Projects in Guangdong Province (YQ2015006), the Fundamental Research Funds for the Central Universities (16ykjc28) Declaration of Interests: The authors declare that they have no competing financial interests to disclose. Ethics Approval Statement: Ethical review of the study was performed by the Zhongshan Ophthalmic Center Ethics Review Committee.