The eastern ports of Zueitina and Hariga have seen a partial lifting of an oil blockade following the agreement that had been coming in the past week.
Two other ports previously held by rebel groups are expected to come back under government control in the next few weeks.
The deal sent crude prices down around $1 a barrel as supply fears eased.
Rebel leaders who controlled Es Sider port said last week that they were within days of an agreement with the government that could end the eight-month stalemate over a trio of oil export terminals.
If all three are reopened, about 600,000 barrels per day of crude could hit the export market.
Oil production is at an all-time low of 160,000 bpd, the National Oil Corporation (NOC) said last week. Normal output before the start of a series of strikes, protests and militia disruptions last summer was about 1.5 million bpd.
Gas exports to Italy are flowing normally, NOC said. However, a condensate pipeline from the Wafa field to the port of Mellitah, operated jointly by NOC and Italy’s Eni, is closed.
This year, Es Sider loaded a tanker, which was then intercepted by the US navy and forced to return to Libya.
Tripoli rejected a rebel demand to return the tanker, but released three Libyans on board. At the same time, the government also warned that it had mobilised its military forces to take back the three ports.
The government of former prime minister Ali Zeidan had issued many such warnings, but never followed through.