Is it necessary to have an agent when applying for a patent?

Article 19 of China’s Patent Law stipulates: "Foreigners, foreign enterprises or other foreign organizations that have no habitual residence or business office in China shall entrust a legally established patent agency to apply for patents and handle other patent affairs in China. If a unit or individual in China applies for a patent and handles other patent affairs in China, it may entrust a patent agency established according to law to handle it. " Units or individuals in mainland China who apply for patents and handle other patent affairs in China may entrust a patent agency to handle them, or the applicant may handle them himself. If a foreigner, foreign enterprise or other foreign organization that has no habitual residence or business office in mainland China applies for a patent and handles other patent affairs in Chinese mainland, or applies for a patent and handles other patent affairs jointly with an applicant in mainland China as the first-named applicant, it shall entrust a patent agency to handle it; Applicants from Hongkong, Macau and Taiwan Province who have no habitual residence or business office in mainland China file patent applications and handle other patent affairs with the Patent Office, or apply for patents and handle other patent affairs jointly with applicants from mainland China as the first-named applicant, they shall entrust a patent agency to handle them.