Kujiyado referred to accomodation that received people who had been approved by magitrate's office and came down from a distance for kuji (suit), and kujishi referred to non-certificate agent that handled legal proceedings such as kuji (suit) and trial out of court.
公事宿は奉行所の公認を受けて公事（訴訟）のために遠方から来た者を宿泊させる施設で、公事師は公事（訴訟）や内済の手続代行などを行った非公認の業者である。