The deal, agreed at talks in Tunis, is intended to lead to a single government and elections within two years.
It needs to be endorsed by both the internationally recognised parliament in eastern Libya and the Tripoli-based General National Congress (GNC).
The agreement is separate from UN efforts at mediation in Libya.
The United Nations special envoy to Libya, Martin Kobler, called it a very good basis for going forward.
In October, the UN submitted its own blueprint for a deal leading to a unified government, but neither side has endorsed it.
The UN is due to host peace talks between the two factions next week in Rome.
Libya has been unstable since long-serving strongman Muammar Gaddafi was toppled in October 2011, with militias ruling various parts of the country.
“This is a historic moment the Libyans were waiting for,” Awad Mohammed Abdul-Sadiq, the first deputy head of the GNC, said after the deal was signed on Sunday.
“If this solution receives real Libyan support – from the people and institutions – we will surely arrive in no more than two weeks or a month to a solution to solve the political crisis,” he told reporters.
Under the “declaration of principles” agreed in Tunis, the two sides would set up a committee to nominate a prime minister pending elections, while another panel would review the constitution.
The GNC is supported by a loose alliance of armed groups, including Islamists, that seized the capital in August 2014.
This forced the existing, internationally recognised government to flee to the eastern city of Tobruk.