First, you finish the book.
I. If you're going for print publication with one of the Big Five New York Publishers you probably need an agent, because these publishers mostly don't look at unagented manuscripts.
Who are the Big Five? If you go to a book-and-mortar bookstore or the book aisle in the grocery and run your finger down a row of books, 90% of them are from the Big Five. Most of the folks who make good money writing publish with one of these imprints. We're talking Hatchette, McMillian, Penguin Random House, Harper Collins, Simon & Schuster and all the subsidiaries thereof.
So that is one career path. If you take it, you need an agent.
A good agent will not only get your foot in the door, she will (a) know the best place to sell your work, which makes the sale more likely, (b) get the best contract terms, and (c) keep the author from making contract mistakes.
There are exceptions to the rule that you need an agent to get in this particular door. Some folk meet an editor at a conference; they're already published; they have a following for their fanfic; they are successfully self-published; they know somebody who knows somebody ...
II. Some imprints from the Big Five (Tor, Avon,) and some large independent publishers (HQN, Baen, Kensington, Ellora's Cave, Sourcebooks, Grand Central, Carina) accept unagented manuscripts.
These books are distributed to brick-and-mortar stores and groceries. Writers can do very well indeed dealing with this set of publishers. A number of the folks making a living at writing sell to these companies.
If you plan to deal with them, you do not need an agent to get your work seen. But a good agent might still perform functions (a), (b), and (c) above.
III. E-publishers and almost all small presses accept unagented submissions.
Agents do not generally submit to these publishers because there's not enough advance money in it.
IV. Self publishing/indie publishing, of course, doesn't need an agent.
So, the short answer is --
-- You need an agent for some career paths and not for others.
-- There are many profitable career paths that don't require an agent.
-- Even where an agent is required, you may be able to sneak by without one, depending.
-- Agents earn their weight in gold at contract time.
-- If you plan to submit to the Big Five, get an agent before you start firing your ms out to random publishers.
-- Finish the book.