Yemeni government officials and rebels agreed on Tuesday to free half of the prisoners and detainees held by both sides within 20 days, officials from the two delegations said.
The deal, seen as the first breakthrough in peace talks which began in Kuwait on April 21, came during a meeting of the joint working group on prisoners and detainees formed by UN special envoy Ismail Ould Cheikh Ahmed.
There has been mounting international pressure to end the Yemen conflict that the United Nations estimates has killed more than 6,400 people and displaced 2.8 million since March last year.
"It was agreed during the meeting to release 50 percent of the prisoners and detainees within the next 20 days," Mane al-Matari, media adviser to Yemen's foreign minister who heads the government delegation, told AFP.
A source close to the rebel delegation confirmed the agreement to release of half of those held by both sides and said "it will be an exchange of prisoners".
The two sides will meet again on Wednesday to finalise the mechanism on how and when the exchange will take place, Matari said.
"The Yemeni government is committed to release all the prisoners as per the agreement," he said.
Matari estimated that their number is in the "thousands", but the rebel source said there may be only hundreds of prisoners involved.
Following a two-day interruption, the two delegations resumed face-to-face talks on Monday after mediation efforts and an appeal by the UN envoy.
The Yemen conflict pits Iran-backed Houthi rebels and their allies loyal to former president Ali Abdullah Saleh against forces loyal to the internationally recognised government of President Abd Rabbo Mansour Hadi who are supported by a Saudi-led Arab coalition.