Anas ibn Malik was born in Madina, Saudi Arabia in 612 AD. People of Madina were known as Ansar, so he belongs to Ansar of Banu Khizraj. Then Madina's name was Yathrib, later Prophet Muhammad (PBUH) changed the name of the city to Madina. When Prophet moved to Madina from Macca, Anas's mother handed over Anas to Prophet. So he lived with prophet as a small helper. Not only a helper but as a disciple of Prophet. A child, so young that he and innocent, a person so lucky that he learned his first lesson from Prophet Muhammad, the greatest teacher of his time and ours. Anas ibn Malik is a person, who observed Prophet's behavior at home in his childhood. A child notices everything, so he noted all the characters and qualities of the prophet.
I haven't found any book in which it is told that 'How prophet behaved with children'. If we have a solid research on that topic, then we can teach our children better, and the biggest source of information is Anas ibn, Malik. His mother came to the prophet to offer some gift as everyone among the people of Madina was offering gifts on the arrival of Prophet to Madina. She offered her Son Anas ibn Malik and the father of Anas had died in Kufr, fighting against Islam. Anas was an orphan. So we can notice another amazing fact of Anas's life that how a Prophet, who was an orphan, treated children, who were an orphan.
Anas reported, " I lived with the family of Prophet Muhammad (PBUH), during 10 years of stay, If I did something he never asked why I am doing that way or I am disturbing that thing. If I forget to do something, the Prophet never said, Why you are not following my command."
Once Anas was told to do some job in the market. He left the house and started playing with other children in the street. Prophet waited for him and after sometime Prophet came out of the house and found Anas playing with children. He slowly moved towards him, and said, O Anas, You are still here'.
Prophet never punished Anas ibn Malik on any wrong act and we have a whole record of his life. He was so kind to people.