The agreement will integrate the Kurdish forces into the Syrian army, bringing most of the country under government control.