Agrabah is a world from the Kingdom Hearts series, based on Disney's 1992 film Aladdin, as well as its sequel, The Return of Jafar. It appears in all the Kingdom Hearts games save for Kingdom Hearts Birth by Sleep, and Kingdom Hearts 3D: Dream Drop Distance. Jasmine, one of the Princesses of Heart, resides in this world. The Keyhole for this world is hidden deep in The Cave of Wonders, within the Lamp Chamber.
 Settings and Areas
The world of Agrabah is basically divided into two parts. The first part is Agrabah itself, where the Sultan's Palace is located. Sora and his party arrive in Agrabah' Plaza (城門広場 Jōmon Hiroba , lit. "City Gate Plaza") here, where they are confronted by their first enemies in the world. Connecting through a door is Storage (物置部屋 Monooki Heya , lit. "Storage Room"), with no enemies and a save point, as well as a few other goodies. Heading north from the Plaza heads to the Main Street (大通り Ōdōri ); shimmying up the nearby pole will take Sora's group to Aladdin's House (アラジンの家 Arajin no Ie ) and another save point. Continuing north takes them to the Palace Gates (王宮前 Ōkyū Mae , lit. "Grand Palace"), where the massive Pot Centipede battle begins. Heading west from Main Street sends them into the Alley (裏通り Uradōri ), while entering the high entrance to the east goes into the Bazaar (バザール Bazāru ). These areas interconnect on many levels, both high and low.
Leaving the city initially takes Sora's group to the Desert (砂漠 Sabaku ), but once the Carpet joins them they can reach the Cave (洞窟入口 Dōkutsu Iriguchi , lit. "Cave Entrance"), where the Cave of Wonders Guardian, which serves as the cave's entrance, must be fought as a boss battle before the party is permitted to enter. Heading in, the group enters the Cave (魔法の洞窟 Mahō no Dōkutsu , lit. "Cave of Magic")'s Entrance (入口 Iriguchi ), with a single boulder trap. Going forward leads them to the Hall (広間 Hiroma ), a massive room full of traps such as boulders, squirting water, and, of course, Heartless. Heading through the door on the opposite side leads to the Bottomless Hall (底なしの間 Sokonashi no Ma , lit. "Bottomless Chamber"), a narrow ledge next to a deep chasm. By dropping into the ravines throughout the Cave, Sora and his group are sent into a set of lower chambers. Continuing forward through the Bottomless Hall takes the party to the final room, the Treasure Room (宝物庫 Hōmotsugura , lit. "Treasury"); it is from here that they eventually gain access to the Lamp Chamber (ランプの間 Ranpu no Ma ) and the Jafar boss battle. Below the Lamp Chamber is an unnamed room filled with lava and stone pillars.
The lower chambers are mostly full of water and are navigated by swimming. The Dark Chamber (暗闇の間 Kurayami no Ma ) holds a save point, a handy place for making sure Aladdin is in your party to successfully gain all of the lower chamber treasures. The Relic Chamber (遺物の間 Ibutsu no Ma ), Hidden Room (隠された部屋 Kakusareta Heya ), and the Silent Chamber (沈黙の間 Chinmoku no Ma ) also hold various treasures and triggers that only Abu can access.
Agrabah is most based upon its first creation in the first game, with certain changes. In this game, the Cave of Wonders is also available.
Agrabah itself takes on a much different appearance in Kingdom Hearts II. It only has two areas, but each of these areas are larger with many bridges and pits. Aside from the main city, the Bazaar holds many enemies, though no shops. However, the Peddler's Shop, the headquarters of the mischievous merchant who causes much of the chaos in the game, has a Moogle shop in it. The Palace can also be reached through the main city.
Going outside the Palace Walls gives Sora's group more options. The first, and in the beginning, only option available is the Cave of Wonders. However, the Cave of Wonders of Kingdom Hearts II is completely different. It has but one floor, divided into the Valley of Stone and the Stone Guardians. The focus of the Cave this time is the Chasm of Challenges. Here, the gang must defeat a number of Heartless in a short amount of time. If they succeed, they can enter the Treasure Room.
In the second part of the game, the other area from the Palace Walls opens up, the Sandswept Ruins, which can only be negotiated by Sora riding alone on Carpet. He can use Carpet to reach the Ruined Chamber, which helps him and his party unlock the secret of Jafar.
Agrabah is mostly the same as it was in the first game; however, there is an extra room, the Gauntlet, which is inside the Cave. Additionally, the Keyhole is accessible, containing the Terminus.
 Kingdom Hearts
The story starts with Jafar looking for Princess Jasmine, but Iago tells him that she is nowhere to be found. Maleficent turns up, telling him that Jasmine is essential for their plan. She also warns Jafar to be careful not to lose his heart, but Jafar shrugs it off, telling her that her 'concern is touching, but hardly necessary.' As Maleficent and Jafar move out to continue searching for Jasmine, the latter peeks out from behind a stall. Later, Sora and the gang meet Jasmine in the alley, before Jafar appears and kidnaps her. Just before she disappears, she tells Sora, Goofy, and Donald Duck to find Aladdin in the desert.
As they run out of the town and into the desert, they find the flying carpet, which takes them to the location of the Cave of Wonders, although the entrance is closed. There, Aladdin is stuck in a pit of sinking sand, and is being set upon by Heartless. Sora, Donald, Goofy, and Aladdin attack the Heartless, but there are too many. Aladdin pulls himself out of the sand and wishes that the Heartless were gone. Genie appears and makes them disappear. As they fly back to the town on the carpet, Genie talks about how he's a prisoner in the lamp, and Aladdin promises to set him free with his third wish.
Aladdin, Sora, Goofy and Donald confront Jafar in front of the palace, where he's with Jasmine. Aladdin uses his second wish to save Jasmine, but Iago steals the lamp, and Genie disappears, dropping Jasmine in a pot, which then becomes part of the Pot Centipede Jafar creates. Jafar and Jasmine disappear, but the protagonists don't discover this until after the Pot Centipede is destroyed.
They then run after Jafar who has run to the Cave of Wonders. The Cave's tiger-head guardian attacks them, having been possessed by the Heartless. As they fight it, Jafar and Jasmine are in the lamp room, where the former uses his first wish to reveal the Keyhole. Maleficent then appears, and Jafar suggests turning Riku against Sora. Sora, Aladdin, Goofy and Donald then run in, seeing Maleficent. She disappears quickly, while Jafar uses his second wish to get Genie to fight alongside him against Sora. When Sora defeats Jafar, he uses his last wish to turn himself into a genie. Sora attacks Iago to get him to drop Jafar's lamp, and rubs it, sending Jafar inside. Unbeknown to Sora at the time, Riku has kidnapped Jasmine and taken her to Hollow Bastion.
The group discover Jasmine is missing, and Sora quickly seals the Keyhole before more Heartless appear. They use the carpet to fly back to Agrabah, where Aladdin uses his final wish to set Genie free, who then joins Sora in order to find Jasmine.
 Kingdom Hearts: Chain of Memories
Agrabah returns in the memories of Sora. Sora, Donald, and Goofy see Aladdin getting attacked by the Heartless. They help him, but become overpowered by the Heartless. Aladdin brings out his lamp and calls forth the Genie to get rid of the Heartless for his first wish. Genie appears and gets rid of the Heartless, leaving Aladdin with two wishes. Sora and the others decided to go with Aladdin to the palace. Along the way, Goofy asks Aladdin why he is going to the palace. He said that he needs to get the lamp to the palace right away. He had acquired the lamp from the Cave of Wonders. The Genie tells Aladdin that he had been in the lamp for a whopping two thousand years and he had grown tired of granting everyone's wishes. Aladdin promises to free Genie with his last wish, but before freeing the Genie, he wishes to be with Jasmine, the princess of Agrabah.
It is hard for a street rat like like Aladdin to get a chance to see Jasmine. He seeks help from Jafar, the royal vizier, to meet Jasmine. Genie thinks Aladdin can go see her as a prince. So they hurry to the palace. On their way, they see Jasmine getting attacked by Heartless. Aladdin has no choice but to use his second wish to save Jasmine. Genie gets rid of the Heartless, but more emerge. After they defeat the Heartless, Jafar appears and takes away the lamp. He plans to use the lamp to get Jasmine for himself. Jafar uses his first wish to bring Jasmine to him. Genie takes Jasmine and Jafar escapes. Aladdin has lost Jasmine and the lamp, but Sora tells him not to give up. Aladdin takes Sora's advice and comes up with an idea to get the lamp back. Sora, Donald, and Goofy follow Jafar to the palace. They are about to engage in battle when Aladdin appears. Jafar tells Genie to get rid of him. Genie punches Aladdin out of the way, but Genie takes this command as a wish and unbeknownst to Jafar, he uses up his second wish.
Jafar uses his final wish to become an all, powerful Genie. However, Sora gets the lamp back and seals Jafar in the lamp. Then, Aladdin uses his final wish to free Genie from the lamp. Aladdin decides that he wants Jasmine to see him for who he really is. This memory ends as Aladdin says goodbye to Sora, Donald, and Goofy.
 Kingdom Hearts 358/2 Days
Roxas's first mission to a new world, outside of Twilight Town and The World That Never Was, begins on his twenty-sixth day in the Organization. He is dispatched to Agrabah with Xigbar, and together the two of them investigate the city, finding it is full of sand, the stores are empty, buildings seem to have been recently damaged, and lumber and rope can be seen all around the city alongside what looks like quick repairs. All this seems to be the result of sandstorms like the violent one currently raging out in the desert.
Xigbar and Roxas spy on Aladdin and Jasmine discussing the town's situation, and after finding a place where they can listen without being seen, they overhear that Aladdin has been working non-stop to shore up the city in preparation for the next sandstorm. Jasmine is worried about him, and suggests they ask the Genie for help. However, Aladdin is determined to protect Agrabah with his own strength. He and Jasmine head off to continue their work.
Xigbar decides that there's no need to investigate the palace. He and Roxas are about to return to the Castle when Roxas is suddenly overcome by a strange vision, images of Xion, and a blonde girl drawing pictures in a white room. He falls over, unconscious.
Roxas takes over three weeks to recover from his sleep, and eventually returns to Agrabah. During a routine mission to release hearts from Heartless, he again comes across Jasmine and Aladdin worrying about an impending sandstorm and about the recent appearances of Heartless throughout the city. Roxas also sees Aladdin scolding Abu for stealing, but keeps out of sight and returns to the Castle once his mission is done.
Another three weeks later, Roxas is sent back to Agrabah with Axel. Upon arriving in the city, he's struck by a strange vision of a boy in red clothes, and feels as if the boy has once stood in the same spot that he has. What was meant to be a simple mission to release hearts is interrupted by the appearance of Pete, who seems to be searching for something. Axel decides on the spot to change their mission goal, but Roxas is apprehensive about ignoring his orders without permission. Axel assures him that someone as suspicious as this is worth checking out, so they conclude that they can destroy some Heartless afterwards. They sneak around the town, following Pete until he reveals a secret door to the desert, and a path to the Cave of Wonders. Axel says that discovering the Cave is enough work for the day, so after defeating the nearby Heartless, they head home.
Roxas returns with Xion to investigate the Cave three days later. They rescue Abu from a swarm of Heartless, and it turns out the small gemstone the monkey was carrying is a key to unlock the deeper rooms of the Cave. They fight their way through Heartless to a dead end, where they find a statue holding some kind of treasure. They are confronted by Pete, who attacks them, saying that they'll never get hold of the magic lamp that is rightfully his. Pete is defeated, but the noise and violence causes a cave-in, and Roxas and Xion escape to the desert.
There, they suddenly find themselves face to face with a flying Carpet, and a magical being who introduces himself as the "Genie formerly of the magic lamp". The Carpet thought it recognized Roxas, but it discovers it doesn't know him after all.
The Genie explains that the two of them had been traveling the world, but had been worried about their friends at home and were on their way back to check up on Agrabah. The Genie is particularly worried about his best friend, "Al", but Roxas does not understand the concept of friendship. When the Genie hears of the danger to the town, his first reaction is to rush off to help, but Roxas explains that Aladdin wants to rebuild the town with his own strength. Genie concedes that it's important to respect Aladdin's wishes, but he still magically stops the sandstorm.
Three weeks later, Roxas finds Jasmine and Aladdin glad that the sandstorm has subsided, since now they can go outside the city again, though the Heartless are still posing a problem. When Roxas heads outside the city limits and into the desert, he encounters a Heartless, the Antlion. He defeats it, and soon afterwards Roxas finds Aladdin commenting that the Heartless' numbers seem to be decreasing. While Roxas spies on Aladdin and Jasmine's conversation, the Genie joins him again to see how things are going with Aladdin and Jasmine. Genie decides not to go and greet his friend so as not to get in the way, claiming that just knowing his friend is safe is enough to keep him happy.
Roxas completes several more routine missions to Agrabah, but when he and Xion visit the city on his 321st day in the Organization, he feels uneasy. He brushes off Xion's concern, and they head to a deep part of the Cave of Wonders that had been uncovered by the previous cave-in. There they find the old, sealed Keyhole, and Xion is struck by a vision of a boy locking it. She suddenly realizes that the boy looks a lot like Roxas, but the two are attacked by a large Heartless before she can say anything. Roxas finds himself struggling to wield his Keyblade, but Xion easily dispatches the Heartless, and helps Roxas to his feet. Roxas assures her that he's just tired.
When Roxas is sent to Agrabah one last time on his 354th day, he sets up a strange, silver, hovering device in the middle of The Lamp Chamber, though Roxas doesn't know what the device does. Roxas is attacked by Heartless, and although he manages to fight them off he finds himself struggling and wondering when he became so weak. As he is about to return home, he pauses in the desert, suddenly wondering just why he keeps carrying out missions for the Organization he knows so little about. Roxas thinks to himself that he doesn't know who he really is, or where he came from, and is concerned about his relationship with his friends. He wonders whether he wants to return to The World That Never Was or not, and as he looks up at the stars, he sheds a tear.
Sometime later, Roxas is transported here by Xion at the Lamp Chamber. Xion uses the Organization's device to summon swords similar to those wielded by Kurt Zisa to attack Roxas. However, Roxas manages to destroy the weapons. Xion then transports herself and Roxas to Twilight Town to continue the fight.
 Kingdom Hearts II
Sora, Donald, and Goofy arrive in Agrabah hoping to meet up with their old ally Aladdin and Jasmine. Once they land, the first few moments are quite hectic. First, they meet Iago whom needs help getting back on the good side of Aladdin and Jasmine. Then, the gang is ambushed by a seemingly endless supply of Heartless; after defeating a number of Heartless, Iago returns and "saves" the group. They escape to a nearby alley and question Iago as to where Aladdin might be. Hinting he could be at the palace, the group go to the palace where they meet a worried Jasmine. Jasmine says that Aladdin hasn't been himself lately and is worried that something is wrong (despite Aladdin's protests). The group embarks on a search to find Aladdin.
After leaving the palace, the group find Aladdin's pet monkey, Abu, stealing a black lamp with Aladdin in chase. After the lamp is returned to the peddler, Aladdin explains why he has been sad as of late; Genie and the Magic Carpet have gone sight-seeing around the world. Iago interrupts again and states that the lamp the peddler was selling was the lamp that imprisoned Jafar. The peddler refuses to sell the lamp to Aladdin unless they pay him with treasure that is fit for a sultan. Refusing to worry the Sultan and Princess Jasmine, Aladdin and the group head to the Cave of Wonders in search of treasure.
At the Cave of Wonders, the group pass through the "Chasm of Challenges" and find what looks to be a gold trophy with gems on the sides. The group heads back to the Peddler's shop where they find Pete arguing with the Peddler to hand the lamp over. The group follows Pete and the Peddler to the palace where a mad race for the lamp ensues. Genie appears and mistakes Pete for Aladdin; angry, Pete summons the Volcanic Lord and Blizzard Lord. After defeating the two Heartless, Aladdin seals the lamp in a case inside the palace. With both Genie and the magic carpet back, Aladdin is back to his old carefree self. Receiving the "lamp charm" (allowing Sora the ability to summon Genie), the group seals Agrabah and leaves, continuing their search for Riku and the King.
The group revisits Agrabah only to find that Jafar has been released from his lamp by the Peddler. Sora, Donald, and Goofy meet up with Aladdin at the Peddler's shop where Jafar orders Aladdin (through a vision) to give him the magic lamp. Iago later tells the group that Jafar is at the Ruins. Genie appears outside the Palace Walls and removes the sandstorm blocking the way to the Ruins. Once at the Ruins, Sora rides the Magic Carpet to the top of the center pillar's roof and fights a few summoned heartless courtesy of Jafar. Iago then leads the group inside the center pillar, misleading them into believing that Jafar is in there, only for them to find out that it was an attempt by Jafar to attack the palace without interference. They escape the trap and head toward the palace.
At the palace, Jafar has chained Princess Jasmine to a wall stating that he is the ruler of Agrabah. Aladdin and the group arrive, much to Jafar's surprise. Jafar transforms into a genie and attacks. Sora defeats Genie Jafar which destroys the black lamp that imprisoned Jafar. Bidding the Agrabah group goodbye, Sora and the group leave to continue their journey.
Data-Sora's pursuit of real-world Pete leads him to the datascape's version of Agrabah, which is overrun by Heartless and Bug Blox. Sora explores the world and meets that world's version of Aladdin. Aladdin is looking for Jasmine, to make sure she's alright and to deliver something to her. He asks Sora to look around Agrabah for her, while he keeps looking near the Palace Gates.
Sora finds Jasmine in the Alley, being accosted by Jafar. Sora confronts Jafar, and drives him off. Jafar encounters Pete, who gives him a duplicate of the lamp made from corrupted data. Sora and Jasmine find Aladdin, who says he found something in the Cave of Wonders that can stop Jafar and fix Agrabah. Jafar appears and kidnaps Jasmine before using the power of the duplicate lamp to stop time for all of Agrabah, except for Sora. King Mickey explains that Sora isn't affected because he is from another world, and that has the power to fight the corruption. Iago, who Jafar has made immune to the time freeze, steals the real lamp from the frozen Aladdin. King Mickey tells Sora to get that lamp to release a friend. Sora chases down Iago, takes back the lamp, and finds Genie inside. Sora wishes to go after Jafar, and Genie transports the two of them to the Cave of Wonders. They find Jafar, who has hidden Jasmine away and uses the fake lamp to create a glitch that seals the cave entrance behind him.
Sora fixes the glitch, and he and Genie work their way through the Cave of Wonders, until they find Jafar in the Lamp Chamber. Jafar tries to tempt Sora into joining him, but Sora refuses and defeats Jafar. Jafar uses his lamp to become a genie and hides inside the world's Keyhole. Sora enters the Keyhole and defeats Genie Jafar, sealing him into his lamp. Before he returns to chasing Pete, Sora tells Genie to take Jasmine and the lamp back to Aladdin.
Outside the Cave of Wonders, Sora confronts Pete, who calls Maleficent. Maleficent, who has also entered the datascape from the outside, confuses Sora with his real-world counterpart before destroying his Keyblade and summoning Shadows to destroy him. Data-Riku and King Mickey arrive and defeat the Heartless, and Mickey demands to know why Maleficent is in the datascape. Although Maleficent doesn't understand the nature of the data worlds, Pete explains that he had been sneaking in the castle when he was pulled into the hub of the datascape at the same time Mickey, Donald, and Goofy were being imported by Riku. He then called Maleficent into the system, and they began planning to use the datascape to take over worlds through the link to Disney Castle. Data-Riku tries to attack the two villains, but Maleficent knocks him out and takes him along as she and Pete leave Agrabah.
Jafar also appears as a boss in his snake form in Kingdom Hearts V Cast.