Start by making a list of agencies and agents whose profile best suits you and your work. Does their track record display the sale of books in your genre? Have they sold books to the age range you are trying to reach? Do they display a proven ability to sell to publishers who reach your target audience? Are you more than satisfied with the types of books they have sold? What writers do they represent? Ask people in the business about the agency and agent--get as much feedback as you can. How many books do they sell a year? How long have they been in business? Do they offer writers a fair deal? Of course no fees to be paid by you. Do as much research as possible re all aspects of the agency and agents.
If you can find a relatively new agency who passes the test, one that to some degree is still in the building process, that's to be considered. If it's a gamble, that might not be the best way to go since you will only find out how much of a gamble after you are perhaps under contract to them with no immediate way out. If you can find that mddle gound, great, but it's extremely hard to do.
There's a lot more to consider, but this is a start.
Good luck.