The Taliban will not attack public institutions such as schools, universities and markets under a confidence-building agreement reached with Afghan officials after two days of talks in Doha.

Afghan politicians and Taliban envoys unveiled a basic “roadmap for peace” in the early hours of Tuesday after two days of emotional talks in the Qatari capital.

Both sides also vowed to cut civilian casualties in a war which last year saw 11,000 non-combatants killed or wounded, according to United Nations estimates.

Tuesday's declaration is not binding and did not formally involve the Afghan government the insurgents are trying to oust, but diplomats hope it will form a foundation for later, official talks.

The Taliban still refuse to talk directly with an Afghan government they brand as American puppets, until foreign troops have left Afghanistan. But in a diplomatic fudge, officials from Ashraf Ghani's government took part in a “personal capacity” alongside prominent opposition leaders, politicians and activists.