There is no train to come to Agadir. The railway line stops in Marrakech. You have the choice between taking the bus or the taxi.
For the coach, two companies for example offer good services in terms of comfort and respect of schedules.
CTM
http://www.ctm.ma/
Supratour
http://www.supratours.ma