It is the first time Prachanda (centre) has met a serving premier
The move was announced in the capital, Kathmandu, after landmark talks between rebel leader Prachanda and Prime Minister Girija Prasad Koirala.
Prachanda said he wanted the new government set up within one month.
Friday's talks in Kathmandu were the first formal meeting between the government and the rebels.
Their joint statement formalised in writing an understanding reached at the height of widespread protests against the rule of King Gyanendra in April.
The talks are the latest step in moves to end Nepal's decade-long insurgency.
No time frame
The BBC's Charles Haviland in Kathmandu says that in agreeing to dissolve parliament, the multi-party government has made far reaching concessions to the rebels.
This is a historic decision and will move the country in a new direction
Maoist leader Prachanda Analysis: What now for Nepal?
The two sides issued a statement after the talks outlining the moves.
It says that the Maoists - who control most of Nepal's rural areas - have also agreed to dismantle their "people's government" once the interim government is in place.
There was no timeframe in the statement.
However, Prachanda told journalists that he wanted the interim government set up within a month. He also said he hoped that elections to a constituent assembly to be held by April 2007 at the latest.
"This is a historic decision and will move the country in a new direction," he told reporters.
The agreement also paves the way for the United Nations to become involved in inspecting the Maoist fighters and the army.
"To conduct the elections to a constituent assembly without any fear, both sides agreed to request the United Nations to help manage both sides' weapons and monitor them," the joint statement said.
There was no mention of the rebels giving up their arms.
The Maoists took up arms 10 years ago, but are currently observing a truce.
It is time the West helps to establish democracy with the king as a figurehead
Sherpa Dinesh
Kathmandu, Nepal
Send your comments Prachanda: Reclusive leader
This is Prachanda's first known visit to Kathmandu in decades and has been taking place amid tight security.
He was flown in from central Nepal by helicopter and was driven to the prime minister's residence where the talks took place.
Our correspondent says the rebel leader has been underground for 25 years and his arrival prompted feverish excitement and a host of rumours.
Progress
Nepal's peace process gathered pace after King Gyanendra agreed in April to abandon direct rule following weeks of street protests and strikes.
STEPS TO PEACE 6 April: Mass anti-king protests break out 24 April: King reinstates parliament, gives up direct rule 30 April: Parliament votes to hold constituent assembly polls 26 May: Preliminary peace talks begin with Maoists 2 June: First Maoist rally in capital in three years 16 June: Top Maoist leader Prachanda meets prime minister
The political landscape has been shaken up since the king restored representative rule.
Opposition parties - who had been speaking to Prachanda while out of power - have since joined the government.
The new government has released rebels from jail, dropped terrorism charges against them and agreed to the ceasefire.
But differences remain between the two sides over the future of the monarchy.
The rebels hope elections will clear way towards abolishing the monarchy, but the prime minister has ruled that out.
Nepal's 10-year Maoist insurgency has left around 13,000 people dead.
Nepal

 Die nepalische Regierung wird das Parlament auflösen und mit den Maoisten eine Interimsregierung bilden. Das haben beide Seiten nach Friedensgesprächen zwischen Premierminister Girija Prasad Koirala und Maoistenführer Prachanda am Freitag, dem 16. Juni, in Kathmandu erklärt. Ein Zeitrahmen wurde nicht vereinbart. Prachanda betonte, dass die Maoisten anstrebten, die Regierungsbildung innerhalb eines Monats abzuschließen. Nach der Bildung der Übergangsregierung wollen die Maoisten ihre Machtstrukturen in ländlichen Gebieten abbauen, so genannte „Volksregierungen“, die es vor allem im entlegenen Westen Nepals gibt. Uneinigkeit zwischen Regierung und Rebellen gibt es noch in der Frage, ob die Monarchie abgeschafft werden soll. Die Regierung plädiert für einen Erhalt der Monarchie, nachdem sie die Machtbefugnisse und Privilegien des Königs stark beschnitten hat.

Politik und Presse in Nepal haben die Ergebnisse der Verhandlungen, die ein Ende des zehnjährigen Aufstandes der Maoisten einleiten könnten, weitgehend positiv aufgenommen. Einige Kritiker betonen, dass die Zugeständnisse an die Maoisten zu weit gingen und dass die Rebellen nicht erklärt hätten, ihre Waffen abzugeben.

Der maoistische Aufstand und die bürgerkriegsähnlichen Zustände in Nepal haben in den letzten zehn Jahren 13.000 Menschen das Leben gekostet. Im Februar 2005 hatte König Gyanendra die Regierungsmacht an sich gerissen, das Parlament aufgelöst und die Regierung abgesetzt. Nach massiven Protesten hatte Gyanendra seine Alleinherrschaft im Mai dieses Jahres aufgegeben.