Hello there, agents work on commission. Usually, they take 15% of your royalties once a book is published. (This varies.) When you epublish your own book, you pay for the copyright ($40), the cover ($20-$500, depending on who you hire), and proofreading (proofreaders charge by the page). You should also have your manuscript edited. All in all, you can count on spending between $400 and $1000. You can also count on spending four hours a day promoting your work. You will make between 70% - 100% of sales (depending on which outlets you use).
If you hire an agent, you will spend nothing. You will also not get very much out of royalties. Publishers will give you 10% of the retail value of a print book. (I've gotten less.) But, you don't have to worry about editing, proofreading, designing a cover, printing or distribution. You still have to promote your book. Getting an agent (and/or publisher) takes a long time as a rule.
If you don't want to wait, and are confident that you can market your book, then shell out the money and epublish.