Insurgents are not party to the deal
Rival Somali politicians have agreed to double the size of the parliament to bring in opposition representatives.
The agreement at talks in neighbouring Djibouti is part of a UN-sponsored reconciliation process aimed at ending nearly two decades of conflict.
Two hundred new seats in parliament will be allocated to an opposition alliance, and 75 will be reserved for civil society groups.
But insurgent groups that control much of Somalia are not party to the deal.
The weak interim government, which is dependent on troops from neighbouring Ethiopia, now controls little territory beyond a few square kilometres of the capital, Mogadishu - and Baidoa, where the parliament is based.
There have been more that a dozen failed peace initiatives since Somalia collapsed in 1991.
The BBC's Robert Walker in Kenya says there are limited expectations about what the agreement - between representatives of the interim government and a faction of the opposition movement, the Alliance for the Re-liberation of Somalia - will achieve.
It is part of a long-running effort to form a new power-sharing government for Somalia.
The enlarged parliament - double the size of the existing one - will then have the job of electing new leaders.
The UN special representative for Somalia, Ahmedou Ould-Abdallah, said it was a step to creating sustainable peace.
But the agreement is unlikely to have any impact on stopping fighting on the ground.
The opposition has split and the faction which has signed this latest deal has little support amongst the insurgent groups fighting the transitional government.
Most of the insurgents have refused to recognise the talks and it is they who now have the initiative.