The Syrian government and opposition have reached an agreement to sit down for their first ever direct talks, UN and Arab League mediator Lakhdar Brahimi announced.