Roma reach Ranieri agreement