His [Valmiki's] Ramayan is generally treated as Adi Kavya, the first Sanskrit poetry ever written. While it was part of oral tradition for centuries, it reached its final form somewhere between 200 BC and 200 AD. The content took a lyrical form after he experienced a painful episode.