Muqtada al Sadr agreed to government demands that he will disarm his militia and get out of the Imam Ali shrine. Sadr apparently became convinced that the government would attack the shrine, and had sufficient Iraqi troops to expel or kill him while doing so. In return, Sadr's gunmen would have their amnesty for crimes committed, and the murder charges against Sadr himself would be dropped. However, Sadr has made deals like this before, and reneged. But this time, once Sadr is out of the shrine complex, the government will have the troops to guard it themselves.
No one is quite sure what Muqtada al Sadr wants, aside from the immediate removal of foreign troops from Iraq. That would make it possible for Sadr's armed followers to attempt a take over of the country. That becomes more difficult each day as the government police and military forces increase. Actually, Sadr's force, which appear to number no more than a few thousand armed men (and not all of them active all the time), are probably already outnumbered by government forces. But the Sadr gunmen are on a Mission from God to make Iraq an Islamic dictatorship, and that fanaticism gives them an edge in combat.
An even larger threat to a free Iraq are the Sunni Arab gangs supporting the Baath Party. But the Sunni Arabs are split between the Baath Party groups who want to return to power, Sunni Arab religious groups that want Iraq run as a religious dictatorship (controlled by Sunni clerics, rather than Sadr's Shia clerics) and various criminal and tribal gangs. There are also Sunni Arab tribal militias that could get involved, although most of the tribal gunmen are defensive. The problem of Shia and Sunni Arab Iraqis fighting each other is nothing new, and goes back over a thousand years. But this time there is a larger element in play, the Kurdish militias. The Kurds, largely because of over a decade of independence from Saddam, have formed the largest private army in Iraq. With over 50,000 armed fighters, organized along tribe and clan lines, they are largely defensive, but have their eyes on the northern oilfields and the two northern cities of Mosul and Kirkuk.
The Sunni gangs are still fighting government forces, and sometimes each other, around Fallujah and a few other Sunni dominated towns. Sadr's gunmen are operating like criminal gangs in a few cities, trying to avoid coalition troops and government forces, while attempting to terrorize their Shia opponents into going along with Sadr's plans (which are, even to his followers, a bit vague.)