Kyooyaku (a person in charge of the entertainment) (饗応役)
The Edo bakufu (Japanese feudal government headed by a shogun) established the post of 'Kyooyaku' during the Edo period to have someone provide entertainment for messengers of the emperor (who were known as "chokushi"), messengers of the retired emperor (who were known as "inshi"), or messengers of the empress (who were known as "nyoinshi") that had been sent to Edo. Mostly, tozama daimyo (nonhereditary feudal lord) was appointed as kyooyaku. Kyooyaku was also called "gochisoyaku", "settaiyaku"or "kanbanyaku." It is known that ASANO Takumi no Kami, who was famous for Chushingura (The treasury of Loyal Retainers), served as kyooyaku for the imperial messenger when he had a sword fight with KIRA Kozuke no Suke.
On every New Year's Day, Seii Taishogun (literally, "great general who subdues the barbarians") of the Edo bakufu dispatched hatamoto (direct retainers of the bakufu) called koke (privileged family under Tokugawa Shogunate) to Kyoto to make New Year's greetings to the emperor and the retired emperor. In response, the emperor and the retired emperor dispatched their messengers to Edo for a return visit from the end of February to mid-March. This was an annual event in the Edo period. Messengers of the emperor or the retired emperor who visited Edo stayed at the bakufu's special residence for imperial messengers, where Kyooyaku entertained them, presented expensive gifts to them, improved the interior of the places where they visited and kept their company.
In many cases, tozama daimyo who was a lord of a castle with territory of 40,000 to 70,000 koku became Kyooyaku for messengers of the emperor, while tozama daimyo of jinya (regional government office) with territory of 10,000 to 30,000 koku became Kyooyaku for those of the retired emperor. As entertaining the messengers of the emperor or the retired emperor cost a huge amount of money, the Edo bakufu appointed only tozama daimyo as Kyooyaku to prevent them from saving extra money. However, to prevent boorish daimyo, who served in the position alone, from behaving in an impolite manner toward messengers of the emperor or the retired emperor, there was a rule that Koke-kimoiri (a kind of mentor for nobles who was familiar with manners and rules of etiquette that had to be observed for members of the Imperial Court) served as an instructor (or an adviser) for Kyooyaku daimyo. Kyooyaku daimyo also had to give expensive gifts to koke as instruction fees. According to "Tokugawa Jikki" (collection of official records of the Edo bakufu), it was 1632 when a series of custom (imperial messengers leave the capital and daimyo entertain them) was established.
And except this event, as messengers of the emperor or the retired emperor were sent to Edo and/or Nikko when needed, Kyooyaku was selected each time.