The power-sharing agreement comes after months of protests following the toppling of the president.