The Orioles have agreed to a minor league deal with veteran right-hander Felix Hernandez.