The person spoke on condition of anonymity Tuesday night because the deal hadn't been finalized.
The 26-year-old Smith had 49 receptions for 767 yards and 11 touchdowns last season, his fourth year with the Baltimore Ravens.
Earlier Tuesday, Smith posted on Twitter, ''Bay Area!!!!!!''
He will be reunited with former Ravens teammate Anquan Boldin. The two beat the 49ers by three points in the Super Bowl at New Orleans following the 2012 season. Smith, who made a formal farewell to Baltimore, played in college with 49ers tight end Vernon Davis at Maryland.
ESPN reported Smith's deal is for $40 million with $22 million guaranteed.
AP NFL website: www.pro32.ap.org and www.twitter.com/AP-NFL