Valmiki (Sanskrit: वाल्मीकि Vālmīki) is the harbinger-poet and author of epic Ramayana.
The Uttara Kanda tells the story of Valmiki's early life, as a highway robber named Ratnakar, who used to rob people after killing them. Once, the robber tried to rob the divine sage Narada for the benefit of his family. Narada asked him if his family would share the sin he was incurring due to the robbery. The robber replied positively, but Narada told him to confirm this with his family. The robber asked his family, but none agreed to bear the burden of sin. Dejected, the robber finally understood the truth of life and asked for Narada's forgiveness. Narada taught the robber the mantra for salvation. But, the mantra in question, the name of Lord Rama, was not to be given to murderers and the like. Narada thus told Valmiki to chant "Mara" the phonetic anagram of "Rama" instead to circumvent this restriction. The robber meditated for many years, so much so that ant-hills grew around his body. Finally, a divine voice declared his penance successful, bestowing him with the name "Valmiki": "one born out of ant-hills".
Śrī Rāma met Vālmīki during his period of exile and interacted with him. Vālmīki gave shelter to Sītā in his hermitage when Rama banished her. Kuśa and Lava the twin sons of Sri Rama were born to Sītā in this hermitage.Vālmīki taught Rāmāyaṇa to Kuśa and Lava.
Source : Valmiki