The chief mediator at the talks, Sudan's vice-president, Riek Machar, said on Saturday: "We hope that now the two principals will take action so that the guns can go silent," referring to the Ugandan president Yoweri Museveni and commander of the Lord's Resistance Army (LRA), Joseph Kony.
The deal means that both sides will cease attacks and hostile propaganda while negotiations continue and is due to take effect at 0600 GMT on Tuesday.
Under the agreement the LRA has also agreed to assemble all its fighters at two Sudanese camps.
If that happens, it would be the first time in 20 years the LRA has revealed the strength and location of its forces.
"If their fighters enter these camps as agreed, then even before we sign a final peace deal, we can say it is the end of the war," said Robert Kabushenga, spokesman for the Ugandan government.
Talks between the two sides began on July 14 in Juba, the capital of south Sudan. The LRA declared a cessation of hostilities there on August 4.
Until Friday, Uganda's government had said it would sign a ceasefire only as part of a comprehensive peace agreement, accusing the LRA of using earlier truces to regroup and re-arm.
Now, however, Uganda has not only signed a ceasefire but also offered an amnesty to all former rebels, including those who the International Criminal Court (ICC) want to stand trial for war crimes.
"I am convinced both sides now want a political solution to end the fighting," Morris Latigo, a veteran northern politician who leads Uganda's opposition in parliament, said.
"The most important thing is to assure the rebels they will be safe from attack, and from the ICC, in these camps. Then they will believe the other promises government has made."
Joseph Kony, the LRA's leader, has not attended the talks in Sudan because he is wanted by the ICC. However he has approved the deal from his base in the Democratic Republic of Congo.
Thousands of civilians have died in the conflict and 1.7 million have fled their homes according to relief organisations.