My boss is awesome. She is fierce when it comes to protecting her clients and she's constantly striving to help them produce the best book possible. She reads pretty much every email sent to her and she will even send personalized replies to some authors if she thinks they are close to being market-ready. I am learning loads from her and I feel extremely lucky to have this internship.
However, if I ever become bed-ridden and decide to finish my memoir, my boss probably wouldn't be on the list of agents that I'd query to. This is because on her website's submission page, in nice big caps, it says NO MEMOIRS.
Several manuscripts have come my way recently and all I could report is that the writing was up to par, but the book itself wasn't market-ready. I couldn't offer any suggestions because the manuscripts were for a genre I don't read. My boss specializes in horror, young adult, middle school, and romance. She chose me as her intern because I read primarily romance and young adult. I can recognize that a, say, Christian fiction manuscript is well-written, but I don't have much experience with that subgenre. Something that reads as overly preachy in the mainstream market may be just enough for the Christian market. My boss has more experience than I do at judging raw marketability, but the majority of her contacts, i.e. editors, are going to be in her specializations. So while you'd be damn lucky to have my boss as an agent because of who she is, she may not be the best person to guide your manuscript into book-hood.
Different agents specialize in different things and most agents will specifically say on their website what they are looking for. Sending them a query outside of their specializations will likely earn you a rejection and why invite more rejection than you need? It also helps to look at an agent's client list. They will usually have a page somewhere on their personal website or if they belong to an agency, there's usually a general client list. If you consider yourself the next J.K. Rowling, don't query Rowling's agent. They already have J.K., they probably don't need another one. Look for an agent who specializes in middle school fiction and science-fiction/fantasy. Find someone who is looking for something like Harry Potter.
If you looked at my boss's client list, you'd see that they tend to write gritty/serious with a strong emotional core. The subgenres are a bit diverse because she's looking for a specific type of story. Look at the client lists for the agents you want to query. Picture a 'If You Read This, Try This' display filled with the books the agents already sold. Does your book fit in there or does it look like it was mis-shelved?
There is one exception to all of this and that's if you attend an industry related conference or event & meet an agent in person. Agents will frequently be available for pitch sessions or panels, and sometimes they may ask you to send them your manuscript, even if it's beyond their specializations. Either you're blocking the way towards the bathroom or something about your pitch intrigues them enough to investigate further. Agents are always looking for the next big thing and if they think your manuscript is the next blockbuster, they will snatch you up lightning quick. So if they want it, send it, but include a reminder about which event they requested it at.