The agreement builds on a landmark July 17 power-sharing deal and provides for a joint civilian-military ruling body to oversee the formation of a transitional civilian government and parliament to govern for a three-year transition period.
Protest leader Ahmed Rabie and the deputy head of the ruling military council, General Mohamed Hamdan Daglo, signed the declaration at a ceremony attended by African Union and Ethiopian mediators.
The signing was met by a wave of applause in the Khartoum hall as representatives from both sides shook hands.
A formal signing in front of foreign dignitaries is due to take place on August 17, the date on which ousted president Omar al-Bashir is due to go on trial on corruption charges, protest leader Monzer Abu al-Maali told AFP.
The following day the generals and protest leaders are expected to announce the composition of the new transitional civilian-majority ruling council, he said.
"Members of the ruling sovereign council will be announced on August 18, the prime minister will be named on August 20 and cabinet members on August 28," Abu al-Maali told AFP.
The deal on a constitutional declaration is the fruit of difficult negotiations between the leaders of mass protests which erupted last December against Bashir's three-decade rule and the generals who eventually ousted him in April.
The talks between the protest movement and ruling generals had been repeatedly interrupted by deadly violence against demonstrators who have kept up rallies to press for civilian rule.
Follow us on Twitter: @The_NewArab