Ali al-Dabbagh, the Iraqi government spokesman, said the authorities support the agreement and "calls upon everybody to commit themselves" to it.
"The agreement contains 14 points representing the government's vision to end public displays of arms, clean Sadr City of bombs, and enforce law in Sadr City," he said.
Al-Dabbagh further said the accord gave powers to the security forces to "raid and search any place it suspects there are heavy and medium weapons" in Sadr City.
There was no immediate comment from the US military.
The clashes in Sadr City began in late March after Nuri al-Maliki, the Iraqi prime minister, launched a crackdown against the Shia armed groups in the southern city of Basra.
Aid groups say at least 6,000 people have fled their homes in Sadr City to escape the fighting and seek help as food and medical supplies dwindle.
Disbanding ruled out
Al-Obeidi, who took part in the negotiations conducted in Baghdad, said the two sides had reached agreement on most issues.
"The two groups agreed on 10 of the 14 points discussed. The agreed points do not include disbanding of Jaish al-Mahdi," he said, referring to the group's al-Mahdi army militia.
Al-Obeidi said: "The agreement stipulates that the government's security forces have the right to make raids and searches [in Sadr City] for those who are wanted but by following the principles of human rights."
Al-Maliki's government is dominated by Shia parties that want al-Mahdi army to be disbanded before provincial elections in October.
Al-Sadr's group argues that it needs its weapons for self-defence as long as other Shia and Sunni groups backed by the US military and al-Maliki's government retain their weapons.
Continued clashes
The news of the agreement was announced by al-Obeidi amid continued fighting in Sadr City, with two hospitals reporting the deaths of at least 13 people in addition to 77 wounded.
Women and children were among the wounded, the hospital's officials said.
Separately, the US military said it had killed eight fighters in different districts of Baghdad on Friday.