Beginning in the eighteenth century, prominent episodes from the story were written down. After the foundation of Bangkok in 1782, the new royal court made efforts to retrieve all kinds of texts which had survived the sack of Ayutthaya fifteen years earlier. Episodes of Khun Chang Khun Phaen were transcribed from earlier texts, or adapted from recitations by storytellers. No manuscripts of Khun Chang Khun Phaen have survived from the Ayutthaya era.
