Obviously you do not write a new query to every agent. (You do know that, right?)
What you do have is a template: the body of the query, the signature, etc. that stay the same for each agent. If this is new territory for you check out the QueryShark blog that critiques query letters sent to the Shark. Read all 200 entries and you'll see what I mean.
Where you want to be careful on those templates and in personalizing the query is that you get the information RIGHT.
Here are some mistakes I've seen recently:
1. "I'm querying you because you like MG fiction"
I love my colleague's MG fiction but I don't rep it and I don't sell it. You're welcome to query me for it; I'll send you a form rejection. When you specifically write that I like MG fiction, it shows me you're either not paying attention, or you're keeping sloppy records. Neither of those things are positive attributes.
2. "I"m querying cause you're at a small agency."
This just makes me laugh. In case you think FPLM is small, consider that we have 12 agents on the FPLM team and we're actually one of the biggest independent agencies in town. There's nothing wrong with wanting a small agency, but FPLM isn't that. Again, this shows you're not paying attention.
Personalization can be tricky. The truth is you really don't need it. Write well enough, and have a project I want to read, and you can leave off all the personalization.
Be careful. Don't bite yourself in the asterisk. Leave the chomping to The Shark Herself.