Genie

Genie is a character from the Disney movie Aladdin, who features in the Kingdom Hearts series. He is first encountered in Agrabah in the first Kingdom Hearts.

Kingdom Hearts
''"The spirit of the magic lamp, who has been freed by Aladdin with his third wish. Genie has joined forces with Sora and friends to rescue Jasmine from captivity. He will attack all locked-on targets, with Showtime." Cost: 2 MP.''

Kingdom Hearts: Chain of Memories
"Captive of the magic lamp. Genie must grant the lamp's holder three wishes He longs for freedom, but can only get it if someone uses a wish to set him free"

Kingdom Hearts II
"Genie spent ten thousand years stuck inside the magic lamp until Aladdin found him. After Genie helped Aladdin defeat Jafar, Aladdin used his third and final wish to set Genie free."

Kingdom Hearts
Genie's role in the first Kingdom Hearts game is mostly the same as in the film, as his lamp is found by Aladdin. The general difference is that all of Aladdin's wishes are wasted to get him out of trouble: the first wish was spent on getting rid of Heartless attacking and the second one is to rescue Jasmine from Jafar. Eventually, Iago steals Genie's lamp, forcing Genie to show Jafar the keyhole of Agrabah and assisting him in fighting Sora, Donald, Goofy and Aladdin. After Jafar is defeated, Aladdin wishes Genie free from his lamp. He then becomes a summon for Sora.

Quotes
"I'm really sorry for this! Run!" (when forced to attack during Jafar battle) "AHHHH! Watch out!"' (when forced to attack during Jafar battle) "Quick, quick, get out of the waaaay!" (when forced to attack during Jafar battle) "Hellllooooo!" (when summoned) "This may leave a mark!" (after using Showtime) "Toodle-loo!" (when dismissed)

Kingdom Hearts II
Genie has much less screen time and much less to do with the plot in the second game. Like in The Return of Jafar, he goes off to see the world along with Carpet. He misses most of the action, but arrives near the end of Sora's first visit and disturbs Pete when he is about to free Jafar from his lamp. Aside from that the only important things he does is clear out a sandstorm for Sora and fix Agrabah after Jafar wrecks it. He seems to have somewhat more ego here than in the first game, as he complains that one lousy sandstorm is just too easy and that he didn't get to help in the battle against Jafar. Genie once again becomes a summon partner for Sora, but his newest feature is copying Sora's Drive forms and wielding his own copy of the Keyblade.

Trivia

 * Originally, Robin Williams was to do voicework for the Genie, but previous bad dealings with Disney left him on bad terms with the company. In his place, Disney hired Dan Castanelleta to do voicework for Genie. This is the third time Castanelleta has done the voice of the Genie since The Return of Jafar and Aladdin: The Series.