After more than a month of violence, the government of South Sudan has agreed to a cease-fire with rebel forces.