I have sheaves of form rejections that wish me a happy career, just not with THAT agent.
Unless a rejection includes specifics about your story (not just your name, not just the book's name), assume it's a form and make no reply. Some forms are short. Some are long. Some mimic a personal response quite well. But no specifics, almost certainly not personal.
If you do get a personal rejection, with specific comments and advice, it's polite to respond, thanking the agent for the gift of her time. Just keep it brief. Mine go something like: "Thank you for your comments on my submission, NAME OF BOOK/STORY. I appreciate your time and attention. Maybe we can work together another time!"