Agents today, if they have one forward-thinking bone in their body, consider self-publishing a viable option. It's a different model, for a lot of reasons (not least of which is no advance). But self-publishing has other advantages (not least of which is no advance). A decision to steer a client to self-publish involves a lot of factors.
Just the fact that there are a lot of variables sounds like a fine reason, to me, to have an expert involved. Yet I still hear a lot of grumbling about agents and earning commissions in a self-publishing model. Maybe I'm biased. Let's look at what's going on:
Before self-publishing was available, agents' most recognized "value added" was knowing the gatekeepers at a publishing house. Gatekeeper. Because that doesn't play a role, most authors chafe at the thought of paying someone a commission to handle their book.
(Now, there's a lot of other stuff an agent does, but authors typically aren't exposed to that until they have an agent. Then it's still frequently so behind-the-scenes that they don't know it's going on.)
Getting a book published, on a "shelf" (digital or real), is only step one. Self-publishing exposes authors to every single subsequent step. Distribution, for instance. Um, PRODUCTION?? Cover design? It also exacerbates longstanding challenges, like promo and marketing. Though everyone cries foul that publishers don't promote authors, they do cover some basics, like printing galleys to send for blurbs. Tweeting, even putting an author up on their site is helpful, for SEO if nothing else. Who takes on the rest of the promo effort? Agencies. Oh, and remember editing? And do you simply trust that Amazon is sending you the royalties you've earned?
^^Hopefully, that doesn't sound like too much for you to handle, intrepid self-publisher. Because it's only the vaguest outline of what goes into a book.
None of this is even getting into what I talk about as agents' "new responsibilities" as digital becomes a bigger and bigger deal. This is all what agents do on a regular basis today.
Do I need to say more?