Representatives from the elected House of Representatives and the General National Congress signed a three-point declaration of principles after talks in the Tunisian capital, according to the agency.
The agreement provides for creating an “appropriate atmosphere” for holding legislative elections in Libya within two years, the report said, citing a copy of the accord.
It also includes forming a 10-member commission equally from both parliaments to help pick a national unity government.
Another panel will be set up to revise the Libyan constitution, TAP said.
The pact is unrelated to efforts spearheaded by the United Nations to reach a political solution to the civil strife in the North African country, Libyan media reported.
Libya has two rival parliaments. The House of Representatives is based in the eastern city of Tobruk and the General National Congress is in the capital Tripoli. Each is backed by competing militias.
In October, the then UN envoy on Libya, Bernardino Leon of Spain, proposed a plan for a Libyan national unity government.
The plan has drawn opposition from different rival factions, who accused Leon of bias.
Last month, German diplomat Martin Kobler succeeded Leon.
Libya is locked in conflict, four years after a NATO-backed revolt that overthrew long-time dictator Muammar Gaddafi.
A civil war has seen the emergence of numerous militias that are still struggling for power in the oil-rich country.
The conflict has allowed the Islamic State extremist militia to gain a foothold in central Libya and has added to the flows of migrants and refugees seeking to cross the Mediterranean to Italy.