Russian President Vladimir Putin said it would be 15km to 25km (9-15 miles) wide and come into force by 15 October.
Troops from Russia, an ally of Syria’s government, and Turkey, which backs the rebels, will patrol the zone.
The UN had warned of a humanitarian catastrophe if the Syrian army launched an all-out assault to retake Idlib.
But after Monday’s meeting between Mr Putin and Turkish President Recep Tayyip Erdogan in Sochi, Russian Defence Minister Sergei Shoigu said the deal meant there would be no such operation in the region.
The Russian president said that under the deal, all heavy weaponry, including tanks, rocket launch systems and mortar launchers operated by rebel groups would need to be pulled out of the buffer zone by 10 October.
Jihadist groups, including those of al-Nusra Front, Mr Putin said, would have to leave the zone.
It was not immediately clear if the zone included Idlib city, which would require some rebels to withdraw from it.
Mr Erdogan said: “We will prevent a humanitarian tragedy which could happen as a result of military action.”
He had earlier called for a ceasefire in northern Syria to prevent what he said would be a “bloodbath” and another major refugee crisis on Turkey’s southern border.
Analysis by BBC Diplomatic Correspondent Jonathan Marcus
Any diplomatic arrangement that postpones a full-scale onslaught against Idlib will be welcomed by the international community.
Such an attack by the Assad government – backed by its Russian and Iranian allies – risked not just a humanitarian catastrophe, but also a direct military confrontation with Turkey.
Turkey has deployed troops at a number of locations in Idlib and has been reinforcing these over recent days. President Assad wants to reassert control over Idlib – the last province in rebel hands.
Both he and the Russians want to destroy rebel groups they call “terrorists”. It is hard to see exactly how a buffer zone arrangement involving Russia and Turkey can address these long-term problems. But averting an offensive for now may give breathing space for additional diplomatic moves.
Idlib province is the last major stronghold of rebel and jihadist groups which have been trying to overthrow President Bashar al-Assad for the past seven years, in a civil war that has killed more than 350,000 people. Idlib, and adjoining areas of Hama and Aleppo, are home to an estimated 2.9 million people, including one million children.
A sharp increase in hostilities since the start of September and fears of further escalation have led to the displacement of tens of thousands. Hundreds of thousands in Idlib live in dire, overcrowded conditions, with a lack of basic services.
Idlib is not controlled by a single group, but rather by a number of rival factions commanding up to an estimated 70,000 fighters. The dominant force is Hayat Tahrir al-Sham (HTS), a jihadist alliance linked to al-Qaeda.
Idlib is also strategically vital. It borders Turkey to the north and straddles major highways running south from Aleppo to Hama and the capital, Damascus, and west to the Mediterranean coastal city of Latakia.
If Idlib is taken by the government, it would leave the rebels with a few pockets of territory scattered across the country and effectively signal their final defeat.