The Association of Authors’ Representatives (in the US) and The Association of Authors’ Agents (in the UK) are professional trade groups for agents. Both have rigorous screening processes, and membership in one is a sign that an agent is legitimate. Their websites contain their organizations’ codes of ethics and membership rosters, and the AAR’s FAQ offers explanations of what you should expect from an agent and a list of questions you should ask.