I've just edited a novel for an author who has, up until this point, self-published. She's also provided marketing for other self-published authors as her side job. She's a very gifted author, and her success is growing. However, she's just finished a book - and I just finished editing it - that an agent wants to represent, and she's going along with that. I've said, previously, that agents are rapidly going out the window, with self-publishing becoming the wave of the future. So why would I agree with her move to go with the agent?
First of all, everyone self-publishing, many without proper editing, has decreased the quality of material overall. Copy editing is one thing indie authors really shouldn't scrimp on, but it seems that many do. Readers are becoming skeptical of anything that they haven't already heard of or that hasn't been published using more traditional publishing, so there may yet be a long-term career for an individual interested in being an agent.
Something to consider when deciding which way to go is the likely age group of your target audience. If you're writing erotica, maybe someone who just wants a bit of nightly titillation won't care about your grammar, provided you don't mind giving it to them for free or for 99 cents. But if you're looking to become the next great novelist, the indie market's not going to cut it. If you're looking to solicit interest among the middle-aged, the indie market is not for you.
Regardless, don't scrimp on quality, regardless of how you do it. You need an editor - both for content editing and copy editing - if you want to actually make writing your career.