Palace Library

The Palace Library (Chinese: 秘書省; in Vietnam: 秘書所, Bí thư sở) was a central government agency in Imperial and monarchical China, Korea, and Vietnam generally in charge of maintaining and archiving the collection of the monarch's documents.

The office was in existence for the most part from the mid-200s CE (Cao Wei) to 1380 (Ming dynasty).

Over the millennia there were five names for this office: In addition to preserving the emperor's official documents, the agency was sometimes also tasked with compiling or editing historical records and state calendars.

Before the Sui dynasty, it also handled documents flowing into and out of the imperial palace, making it interchangeable with the Secretariat.

It was first established under the reign of the Minh Mạng Emperor under the name Palace Library Section (秘書曹, Bí thư tào) and would retain its final form during the reign of the Thiệu Trị Emperor.