The epic is traditionally ascribed to the sage Vyāsa, who is also a major character in the epic. Vyāsa described it as being itihāsa (transl. history). He also describes the Guru–shishya tradition, which traces all great teachers and their students of the Vedic times.
The first section of the Mahābhārata states that it was Ganesha who wrote down the text to Vyasa's dictation, but this is regarded by scholars as a later interpolation to the epic and the "Critical Edition" doesn't include Ganesha at all.[16]
The epic employs the story within a story structure, otherwise known as frametales, popular in many Indian religious and non-religious works. It is first recited at Takshashila by the sage Vaiśampāyana,[17][18] a disciple of Vyāsa, to the King Janamejaya who was the great-grandson of the Pāṇḍava prince Arjuna. The story is then recited again by a professional storyteller named Ugraśrava Sauti, many years later, to an assemblage of sages performing the 12-year sacrifice for the king Saunaka Kulapati in the Naimiśa Forest.