The 49ers agreed to a trade that would send an undisclosed draft pick to the Miami Dolphins for Jonathan Martin.