There are hundreds of literary agencies. And thousands of literary agents. One of them can be the champion of your work. They will secure the best deals for you, guide you through the marketing process, and support you and your work until your book finds a solid place on as many bookshelves as possible. But the majority of the agents are not the right ones for you. Not because you were a bad writer. But the agents specify a lot and the literature world is very rich. You need to send your queries to people who actually work with books similar to yours. Especially if you write in a marginal genre. How do you choose whom to approach in the first place?
Choose someone approximately appropriate
The agents usually list their literary interests and types of works they are currently looking for on their web pages, blogs, even on their Twitter accounts. Usually, they don’t list just one interest but several genres. Some even represent and enjoy both, fiction and non-fiction.
Except for genres, the agents often mention also the specific details or issues they wish to champion. For example, they may state they represent horror, but they prefer gore, not ghosts. Or they champion romance but can do without explicit sex. Or they do not wish to see LGBTQ too much. Others prefer exactly that.
So look at your work and try to evaluate how much of the agent’s interests match your work. If the agent does not specifically mention sci-fi in his list but he mentions characters of color, philosophy, and slow-burn action which create the core of your work you can try your luck and send them a query letter.
Respect their dislikes
The upper mentioned were the options when you can afford to send a letter. But the agents often explicitly state what they do not want to see in their inboxes. It can be a whole genre, like memoirs and cookbooks. Or they have issues with abuse and torture. Or they do not wish to represent works similar to some other authors whom they despise. H. P. Lovecraft is on a blacklist for his racism, Orson Scott Card for his homophobia and bigotry. There are agents who have these and also other names listed on their profiles with a note “do not send if similar”.
It doesn’t matter how good the rest of your work is. Or how you cover, even do not mention these issues in your query. It is simply not worth it. Should you succeed and get the agent to actually read your work, not just the lying query, you are in trouble once they find out. You waste the time of both of you.
However, what you can do with this is to check whether the questionable issues are really necessary for your work. If they are marginal and can be omitted, you can create a special version of the book just for this agent should they ask to read it. And then you can mention there is the option of these small details and you can discuss adding them back in an open and sincere discussion at the point where you have already invested an honest effort and time into your business relationship. You may even find out these omissions make your book better.
Querying is a tiring and long process. You may find out you spend even one hour sending a good letter to a single agent. Why? Because it really, really needs to be good to give you a chance to succeed. You are not writing to your forgiving aunt who does not mind bad grammar, unfinished sentences, and empty blah blah. You need to revise the agent’s profile to make the letter and other material you need to send them fit.
Since this can take some time, you can start with ten or twenty agents and send a few queries each day. Then take some rest for two or three weeks while you wait for an answer. Some agents reply within a few days, some take a few months. So don’t be alarmed. Choose another set of agents for the next month. Do keep in mind that many authors sent hundreds of queries until they succeeded. Yes, hundreds. Or they simply turned to self-publishing.