Rikki-tikki-tavi likes humans. He finds them a little funny sometimes, but he enjoys the fact that they give him food and he wants to be a good house mongoose and protect the people from the snakes. As soon as Rikki-tikki joins the family he behaves with curiosity and calm.
[He] sat on all their laps one after the other, because every well-brought-up mongoose always hopes to be a house-mongoose some day and have rooms to run about in, and Rikki-tikki's mother … had carefully told Rikki what to do if ever he came across white men.
Rikki enjoys living with people. He is too unsettled to sleep with the little boy, Teddy, but he settles down with him at first when he goes to bed. Then he roams the house. He takes food from anyone who offers it. He behaves almost like a pet, but also like a guardian.
When Rikki-tiki kills the dusty little snake Karait, the people react in a way that completely confuses him.
Teddy's father beat the dead Karait. ``What is the use of that?'' thought Rikki-tikki. ``I have settled it all''; and then Teddy's mother picked him up from the dust and hugged him, crying that he had saved Teddy from death, and Teddy's father said that he was a providence, and Teddy looked on with big scared eyes. Rikki-tikki was rather amused at all the fuss, which, of course, he did not understand.
Rikki-tikki doesn't understand why the man would beat Karait when he had already killed him. He also doesn't understand why they would make a fuss about Rikki-tikki. They consider Rikki-tikki their pet and they worried that he was in danger.
Rikki-tikki’s goal is to protect the people from the two cobras, Nag and Nagaina. The cobras feel that the people are a threat to them. They have a group of baby cobras about to hatch. This is one of the reasons that Rikki-tikki has to kill them.