Are you buying or selling?
Real estate agents for a buyer definitely do have value. They can represent your interests (good ones contract as fiduciaries to you), whereas a seller's agent acting as a double agent owes loyalty to no one and actually benefits from a higher commission if the sale price goes up.
Also, a good agent has connections with mortgage banks, which can help grease the wheels if you're financing gets bogged down in back office hell. Once the offer is accepted, they will also smooth things over with the sellers if the mortgage app takes longer than desired, which is common since some banks suck at processing the paperwork correctly and often ask for things that were already submitted over and over.
A good agent can also recommend a good home inspector for you, and typically has recommendations for contractors if you are getting a great bargain on the house knowing there is important work that needs to be done. All of this is a lot easier than trying to find your own lawyer to handle closing, your own home inspector, etc. Additionally, a good real estate agent has their finger on the pulse of the neighborhood in the sense that they can make an informed recommendation when you are submitting your offer, if the asking price is reasonable or likely to come down, or if something better is likely to come along. They also may be privy to information on unlisted sales in your area, and be able to get you in to to see these properties, which typically go for less than listed properties because the seller desires to sell to someone that will actually live in the home, for example, rather than a flipper/speculator/future landlord.
You'll have to do your homework to find someone like this, of course, as there are plenty of R/E agents out there who just want to make a quick buck. It's sort of like when you are 18 everyone wants to be a DJ. Now in your 20s and 30s, everybody wants to be a R/E agent. So you have to choose carefully.