Sudan says it will begin to disarm Arab militias who have forced an estimated million people from their homes in the western Darfur region.
Annan's trip followed other high-level delegations to Sudan
The pledge followed a meeting between Sudanese President Omar al-Bashir and UN Secretary General Kofi Annan who has finished touring Darfur.
There have been several high-level visits to the Darfur region this week.
But UN official Jan Egeland has warned Sudan officials may be unable to control the "monster" they had created.
Although the Sudanese government and rebel groups have signed a ceasefire, daily violence continues in Darfur.
Mr Egeland who is leading the UN's emergency relief has said they had reports of villages in northern Darfur being bombed and four lorries carrying aid for different humanitarian agencies had been looted at gunpoint.
The Sudanese have agreed to remove obstacles to humanitarian aid following complaints that aid workers have been stopped from going to the region.
Washington earlier threatened to impose sanctions against Sudan if officials did not curb the militias.
Some one million people have fled their homes in the Darfur region and at least 10,000 have already died in a conflict in which the Janjaweed Arab militia has been accused of "ethnic cleansing".
The UN has warned that the refugees could die from famine and disease unless they are allowed to return home.
About 200,000 Sudanese are reported to be seeking refuge at Camp Iridimi, Chad, near the border with Sudan.
They told a correspondent from AP news agency that their settlements were first bombed by airplanes and helicopters.
Militiamen then arrived burning down their houses, killing and raping.
"They killed my husband. They killed my children. They burned my house. They stole my cattle," said Aza Jumah Tedel.
Mr Egeland said the refugees had been "hunted down by the most hideous campaign of terror".
Human rights groups say the authorities have given support to the militias, a charge officials deny.
"The government of Sudan commits itself to... immediately start to disarm the Janjaweed and other armed outlaw groups," the joint Khartoum UN statement said.
A spokeswoman for Human Rights Watch Jemera Rone told the BBC's World Today programme that Sudan's government "rarely ever" honoured its promises.
"Their track record is very poor. They prefer to promise... and later go to do whatever they set out to do to begin with."
Negotiations between the warring groups in the Darfur region and the Khartoum government are due to take place in the Ethiopian capital, Addis Ababa on 15 July.
But a spokesman for one of the groups, the Justice and Equality
Movement (JEM) told AFP news agency on Saturday that they would not be attending.
"These negotiations are coming too quickly, since several of the points in the ceasefire accord of 8 April have not been respected, like the creation of a humanitarian corridor and the disarming of the Janjaweed," Abdallah Abdel Kerim told the agency.
On his visit, Mr Annan called on Sudan to take swift action by disarming the Janjaweed and ensuring refugees can receive aid and return home.
"My message is simple," he said, "violence must stop."