Reliever Joe Smith and the Houston Astros have agreed to an $8 million, two-year contract.