Later Brahma came to give Valmiki divine inspiration for his verse and afterwards, Valmiki fell into a meditative trance and saw for himself the life and adventures of Rama and Sita.
He composed the story in verse and taught it two his disciples as shown here.
Answers & Comments
Brahma