In the books and many of the screen adaptations, Kaa is an ally of protagonist Mowgli, acting as a friend and trusted mentor or father figure alongside Bagheera and Baloo.
Kaa breaks down the wall of the building in which Mowgli is imprisoned and uses his serpentine hypnosis to draw the monkeys toward his waiting jaws.
Generations of monkeys had been scared into good behavior by the stories their elders told them of Kaa, the night-thief, who could slip along the branches as quietly as moss grows, and steal away the strongest monkey that ever lived; of old Kaa, who could make himself look so like a dead branch or a rotten stump that the wisest were deceived till the branch caught them, and then—The python despises poisonous snakes: Kaa was not a poison snake--in fact he rather despised the poison snakes as cowards--but his strength lay in his hug, and when he had once lapped his huge coils round anybody there was no more to be said.In The Second Jungle Book, Kaa appears in the first half of the story "The King's Ankus".
The light seemed to go out of his eyes and leave them like stale opals, and now and again he made little stiff passes with his head, right and left, as though he were hunting in his sleep.
Mowgli dozed quietly, for he knew that there is nothing like sleep before hunting, and he was trained to take it at any hour of the day or night.
Then he felt Kaa's back grow bigger and broader below him as the huge python puffed himself out, hissing with the noise of a sword drawn from a steel scabbard;
"I have seen all the dead seasons", Kaa said at last, "and the great trees and the old elephants, and the rocks that were bare and sharp-pointed ere the moss grew.
This version of Kaa is recast as a secondary antagonist, as Walt Disney felt audiences would not sympathize with a snake character.
Kaa encounters Mowgli again later in the film and once again, hypnotizes him in quick succession, this time using his song, "Trust in Me", to lull him into a deep sleep, though he must hide him when Shere Khan asks him if he's seen the boy.
Kaa is based on earlier characters from Disney films who comically and unsuccessfully attempt to eat the protagonist, including Tick-Tock the crocodile from Peter Pan and the wolf from The Sword in the Stone.
Kaa is depicted as a far more menacing predator who lives in Monkey City with King Louie, guarding the orangutan's treasure from intruders.
While Mowgli is hypnotized, Kaa reveals that he came to live in the jungle after Shere Khan killed his father and Bagheera found him, then describes to him the power of the dangerous "red flower," fire.