"The Eloquent Peasant" is thought to have been written around the same time as "The Tale of Sinuhe", about the middle of Egypt's Twelfth Dynasty of the Middle Kingdom. But this narrows its author down only to a couple of generations on either side of 1878 BCE.
Moreover, versions of the story may have been told in the centuries before that. The events depicted are supposed to have taken place in the Ninth and Tenth dynasties, possibly putting the work's origins back before 2025 BCE. On the other hand, some scholars claim to find evidence that dates composition to much later— in the Thirteenth Dynasty, well into the 1700s BCE.
But the copies do not always agree in their overlapping sections. Proper names for people and places in the story often differ among the versions.
One thing we can guess with some assurance is that the author—if there was a single author—was a member of the affluent, educated class. Not only would someone from the poor classes be too illiterate to set the story down in hieroglyphics, but he would be ignorant of the fine intellectual points discussed by the "eloquent peasant" of the story.
In the Middle Kingdom the Egytian ruling classes and their functionaries revelled in literature and rhetoric (the art of persuasive speaking). "The Eloquent Peasant" would have been a great entertainment for them, as well as would have expressed the ideals that were meant to guide their lives.