After leaving Traverse Town, you should now be able to travel to Agrabah. The world is based off the one seen in the 1992 Disney movie Aladdin. After a cutscene, get ready to fight some Heartless.
 Finding Aladdin
From where you start, go to the Main Street and then the Alley. A cutscene will show Jasmine introducing herself to the party. Following that will be another scene, where you'll meet Jafar, who sends Heartless after you. After you get rid of them all, jump on the ledge on which Jafar introduced himself. Release the keyhole to open up a new path. Now jump across to the other area by using the windows. Here there will be another way to the Main Street. From the ledge you end up on, jump across from you and then across from that. An opening will lead to a pole you can climb on, which leads to Aladdin's House. Move the boxes to free the Magic Carpet. It will then fly off toward the desert, and you'll be prompted to follow it.
Jump through the opening in the wall down to the Main Street. Go back to where you started in the Plaza. Past that will be the Desert. The Magic Carpet will land next to a Save Point. Press next to the Magic Carpet and then All Aboard to ride it. Following that will be a cutscene. Fight the area's Heartless to save Aladdin, and he will then summon Genie to get rid of the remaining Heartless. After a couple more cutscenes, you will be able to add Aladdin as a party member. After another cutscene, you'll be back at the Plaza.
 Finding Jasmine
Go back to Aladdin's House for another short scene and then head back to the Alley. Go through the upper path to the Main Street and head to a path leading to the Bazaar. Jump across the windows and jump up onto the higher ledge. Release the keyhole and go back to the Main Street. Jump up the ledges leading to Aladdin's House, then jump across to the path you opened with the keyblade. It should take you to the Palace Gates, where you'll see Jafar and Jasmine. Jump down to get noticed, and Jafar will address Sora and Aladdin. Jafar will then get a hold of the lamp and escape, and you'll be left to fight your next boss.
 Pot Centipede
Your main targets in this battle are the head and tail of the Centipede. However, before you take on the actual boss, it would be wise to dispatch all the Pot Spiders first. Attack the Pot Spiders that comprise the Centipede's body, and use to send the two other party members into the fray. As the Pot Spiders are destroyed, more will appear to take their place until none are left. At this point, the head and tail will rampage through the streets of Agrabah, knocking down the piles of crates. More Pot Spiders will appear and reform the body. Destroy these as well, and pick up the HP Orbs they drop. The only threat here is the whipping attack of the tail, and electrical whipping of the head's antennae. However, since you will be focusing on the body, this shouldn't be too much of a problem. Just be mindful of how close you are to the head and tail, and don't get complacent. The Pot Centipede may not have a large range of attacks, but they are brutal.
Eventually, no more Pot Spiders will appear, and this is your cue to attack the main enemy. Send the two others to take on the head of the centipede while Sora takes on the tail. The constituents will continue to use the techniques listed above, but no longer have the mobility they once did. This enables you to make a quick escape if necessary to recover.
 Cave of Wonders
You must now head to the desert, where a cutscene will be followed by another boss fight.
Cave of Wonders Guardian
First, the Cave of Wonders will emit lasers from its eyes, just like the Stealth Sneak did. It can either be reflected (particularly using Guard), or simply avoided. To attack the Cave of Wonders, you need to climb up its side, and then strike its eyes (make sure to strike them when they are glowing). You do not want to be down where your teammates are, as the Cave of Wonders will be shooting lasers, exhaling fire and summoning Heartless in the process. If you do not find it easy to climb up the side of the Cave of Wonders, then wait until it dives its head down into the ground. Once this happens, climb up the back of its head. You can go around to the back of the head and try and jump on its back, then run up to the head and attack (this could take some time). If you are on its head, it will occasionally shake you off. Just climb back up and continue attacking its eyes. Alternatively, if you are good with magic, stand back and lock onto the eyes, using the Fire spell from a distance. Should you run low on health, you can kill some of the nearby Heartless for some HP Balls or simply use Cure. There is seldom a significant strategy to this battle other than being to work yourself up to its eyes to attack and heal yourself when necessary.
After the battle is over, you'll be able to enter the Cave of Wonders. Entering will have you greeted by none other than the Heartless. Go down the stairs to the side of the main path, and you'll fall into a pool of water. This is known as the Relic Chamber. A Save Point is located on one of the platforms. If you don't have Aladdin in your party, replace Donald or Goofy - whichever you prefer - as Aladdin is necessary for one of the coming tasks. Treasure chests will be scattered all about so be sure to collect the treasures hidden inside. Swimming up the waterfall will bring you to the Dark Chamber. Swim up the next waterfall to enter the Silent Chamber. Here, go down the waterfall to see a statue holding a glowing stone. Climb up in front of it and press , then to tap it with your keyblade. It will open up a secret door. Go back to the Relic Chamber through the shortcut here and climb up the stairs across from the second statue. Call Abu to tap on this statue's stone, and stairs will rise, allowing you to get to the platform the statue is located on. A passage behind the statue leads to the Dark Chamber. From here, jump off the platform and to the waterfall. Swim in front of the first statue and once again, call Abu. A new path will open. Through the new shortcut, go to the Silent Chamber. Go through the passage here to the Hidden Room. In this room, climb up the stairs and examine the pillar across from you. Lock on with and blast it with Fire. You can now leave the chambers and go up the higher area where you started. Go through the path leading to the Treasure Room, then the Lamp Room. Here, you will have a boss fight against Jafar.
This battle is fought in the Lamp Chamber, where you face off against both Jafar and Genie. Genie releases only minor attacks, apologizing beforehand. If he manages to hit you, he releases a small amount of HP, MP, or Munny balls at the same time, but use the time he apologizes to figure out where he is and so you can Dodge Roll out of the way or Guard. Jafar, who floats across the chamber just out of reach, is the far greater threat. He occasionally evokes an ice storm at the center of the chamber (avoid it by simply staying out of the way). His main attack is a continuous beam of electricity from his staff. Mainly all of his attacks are simply random and different blasts of magic from his staff. If you’re patient, you can wait for Jafar to drift down for a more personal assault. If not, you can simply track him down on top of whatever raised area he’s standing on and let loose with a flurry of combos from the Keyblade. It’ll make things go a lot faster.
Either way, just keep attacking until he turns into a small ball of white light and floats off. Since you can’t hurt him in this form, use this time to heal the party. Once Jafar returns to human form, the process starts all over again until he’s beaten. The prize for winning this fight is a Blizzard upgrade. After this, heal your party at the save point in the treasure room and head across the lamp chamber towards Jasmine and jump into the massive pit.
Move on forward and, after a cutscene, go through the door for another cutscene. Jafar will transform into a genie, becoming the final boss of Agrabah.
As a genie, Jafar fights by picking up burning boulders from the lava and throwing them at you. They are easy to avoid by just running away from Jafar; he doesn't throw his boulders very far. Even if you are hit, it shouldn't be too troublesome, as he only hurls one rock at a time, and he doesn't pick up another one for at least five seconds. This gives you a good chance to heal if your HP is low. To defeat Jafar, you actually have to whack at the lamp that Iago carries around the chamber. Lock onto the lamp to keep track of where Iago is, so you can easily get to him and attack. When not over the middle platform, Iago may be found flying around one of the two platforms that are found at the opposite sides of the pit. The lamp is easy to hit when on the middle platform, but when on either of the side platforms, your chances of hitting the lamp varies. Sections of the side platforms are able to rise and descend, making it harder to get to Iago when the floor is lower in altitude. Finally, magic does no damage to the lamp whatsoever, so you must chase Iago down in order to deplete Jafar's health. When victorious, your Fire spell will be upgraded to Fira, and you can read the first Ansem's Report.
After Sora locks the world, you'll have to escape the crumbling Cave of Wonders by navigating past falling boulders with the Magic Carpet. You'll be able to leave the world after another cutscene, in which you will gain the ability to summon Genie.