There are a few other things a good agent will help you with. If you are unhappy with the publisher's choice of a title or cover design, an agent can plead your case for you--probably with less emotion and more professionalism. An even more difficult scenario is if the publisher decides your manuscript is not"acceptable" (as dictated by your contact). Your agent can handle it without you having to get into a conflict with your publisher. Another advantage an agent has is that they can usually find out more about why the publisher made a certain decision. The publisher doesn't have to try and spare the agent's feelings--as they might dealing directly with the author.
When it's time for your book to go out of print, and agent can see that that happens in accordance with the terms of your contract. This situation can get sticky when a publisher decides he wants to hang onto the rights for years. Ultimately the agent concentrates on handling your business and safeguarding your rights, while you concentrate on the writing. They can become the adversary with the publisher when necessary, while you maintain a positive relationship with the editors and the house.