Around the beginning of the 2nd century CE, the southeastern part of the Ancient Agora underwent a transformation with the construction of the Library of Pantainos and a complex of rooms and galleries around it. The library is located east of the Panathenaic Way, to the south of the Stoa of Attalos. According to the dedicatory inscription found embedded in the Late Roman wall, the library was dedicated by Titus Flavius Pantainos and his children to Athena Polias, Emperor Trajan and the people of Athens, between 98 and 102 CE.
Today, the building is partially preserved and partly covered by the Late Roman wall. Its floor plan is unique, as its architectural design was adapted to the irregular free space between the Panathenaic Way and the Stoa of Attalos. The central part of the building consists of two rooms, one of which is an atrium. The large room to the east of the atrium had walls and floor lined with marble slabs. Surrounding the rooms were three porticos with Ionic colonnades and rooms at the back, primarily functioning as shops or workshops. The western portico was built along the Panathenaic Way, the small northern portico was located opposite the southern end of the Stoa of Attalos and the large eastern portico ran parallel to the street connecting the Ancient Agora with the Roman Agora, which was constructed in the late 1st century BCE from the donations of Julius Caesar and Augustus. The monumental enhancement of the road leading to the commercial market, with the construction of the eastern portico and the paving of the road, was undertaken by the Athenians.
The votive inscription that occupied the lintel of the central room mentions that Pantainos, who identified himself as a priest of the philosophical muses, donated the library along with all its books and equipment, as well as the peristyle with the external porticos. A second inscription reveals the regulations of the library, including the prohibition of taking any book outside the premises and details about its operating hours.
The Library of Pantainos appears to have been a multifunctional building and many scholars argue that it served as the seat of a philosophical school of the city. In addition, there are indications that one room was used as a place of worship, dedicated to the emperor Trajan. Whatever may be the case, this monumental building is associated with Athens’s role as a cultural and educational centre of the Roman Empire.
During the raid of the Heruli, the building suffered severe damages, particularly in the north and west porticos. In the following years, part of it was incorporated into the Late Roman wall, while many of its architectural elements, such as architraves, column sections, capitals and cornices were detached to be reused on the sides and in the filling of the wall.