Can government agencies apply for patents?

An administrative unit can apply for a patent. Patent applications are open to citizens and units (legal persons), and administrative units can also apply for patents as long as they meet the statutory conditions.

Yes, institutions are also units. Enterprises and institutions with organization codes can be used as applicants. Both the enterprise and the government can be patent applicants, but the inventor must be a natural person who has made creative contributions to the invention.