Agadir is a cosmopolitan type of tourist destination where there is no strict dress code although some consideration must be given to Moroccan culture.
The emphasis on dress code is dependent on where you are in Morocco;
- in tourist resorts you can dress much as you would anywhere else when on holiday but with certain limitations; women should not go topless on the beach although some select hotels do allow this but they are few and far between. T-shirts and shorts are acceptable as long as they are not too tight or revealing.
- in places such as small villages, Moroccan homes, public events etc you must show some respect and keep most parts covered although this would not normally apply to having ones head covered.
- as tourists are not allowed into mosques (except in Casablanca) there is no issue to discuss on this subject.
Moroccans are well used to seeing a bit of shoulder or leg in such places as Agadir, Essaouira, Marrakech etc and there is little opposition from locals, just dress comfortably so as to not show cleavage or thighs in public places like the souk or streets.
There do not seem to be any such limitations on men although going into a restaurants, either on the street or in hotel, in speedos is not permitted.
The beach is a different matter, people go swimming so you will expect to wear swimwear.