Sage Valmiki/Agni Brahma/Lohajangha was born in the BCE period in a Brahmin family. He was the son of Pracheta/Sumali who belonged to the bhigu gotra. There exist two legends about the early life of Rishi Valmiki.
According to the first, Rishi (Agni Sharma)once interacted with Narada. Conversationwith Narada made an impact on his life. He began his japa of the word ‘Mara’ which means ‘die’. He continued this for several years, which led to the formation of anthills around him. This is why people started calling him Valmiki. Also, due to continuous chanting, the word ‘Mara’ became ‘Rama’, and thus, Lord Vishnu’s avtaar was named Rama.
According to the second legend, as mentioned in theNagara khanda of the purana Skanda, Valmiki was named Lohajangha after birth. He was a devotee of his parents. They used to live in the Anarta region. It is said that lack of rain made the family face hardships. This is why, fate compelled Lohajangha (also known as Valiya by some) to steal food and money for his parents’ well being. Later, he tried to steal the Saptarishis, but he couldn’t. They made a huge impact on him due to which he decided to choose the wise men’s path and turned into a sage. Pulaha gave him a mantra which he kept on chanting and thus, there were anthills formed all around him. The Saptarishis said that as he was seated in a Valmika(anthill), he will be known by the name Valmiki and this is how Valiya turned into Valmiki.
Once, Valmiki was going towards river Ganga along with his disciple Bhardwaja. He was mesmerised by the sight of the crystal clear water.He was contented to see a couple of cranes mating but later, a hunter shot the male crane with an arrow which led to his death. He was disturbed by this sight an cursed the hunter saying
“मानिषादप्रतिष्ठांत्वमगम: शाश्वती: समा|
It means that you have disturbed the peace of innocent lives and this will never bring happiness in your life.
This is considered as the firstshloka ever.
Later, when Seeta was expelled from Ayodhya as the common people didn’t believe that she was pure after Ravan
forced her to come to Lanka, Valmiki brought her to his Ashrama. She gave birth to Lav and Kush in his ashrama. He taught them life lessonsand made them excel all fields. Valmiki had the power of being able to see the future. This is how he foresaw all the events which were going to occur in Lord Rama’s life and wrote the first poem (kavya) Ramayana and taught it to Lav-Kush. This is why, he is regarded as Adi Kavi (the first poet).