Vyasa is traditionally credited as the composer of the Mahabharata.
Hindu tradition identifies Vyasa, also called Krishna Dvaipayana or Veda Vyasa, as the sage who composed the epic and appears within its own narrative. The tradition further says that the elephant-headed deity Ganesha wrote the poem as Vyasa dictated it, though this framing belongs to later interpretive tradition rather than a modern historical authorship claim.
The Mahabharata is a layered Sanskrit epic that grew over centuries. Scholars generally treat it as the product of multiple stages of composition and transmission rather than the work of one identifiable historical author. Vyasa therefore represents the traditional attribution, not a securely documented literary biography.
Vyasa is also associated with arranging the Vedas and composing or transmitting other Hindu texts. He should not be confused with Valmiki, who is traditionally linked with the Ramayana.