According to "Ruiju sandaikyaku" (statute book written in the Heian period), gagakuryo (a government official in the ritsuryo codes, who administers gagaku [ancient Japanese court dance and music] and gakunin [players]) and zatsugakushi (a musician of various music other than gagaku) were established when Daijokanpu (official documents from Daijokan [Grand Council of State] to local governments) was issued on May 23, 809.
『類聚三代格』によると、809年（大同(日本)4年）3月21日(旧暦)の太政官符に雅楽寮、雑楽師が定められた。