Yemen's government and opposition will on Wednesday sign an agreement in Riyadh brokered by Gulf states to end three months of deadly unrest, officials on both sides told AFP.