A 32-year-old man was sentenced to 29 years to life in prison Friday for robbing a Secret Service agent in Tustin in June.