Probably every songwriter on the charts has an agent, but it's kind of a catch 22 situation. No agent = no hits but no hits makes it really hard to find an agent.
Making It With Music: Kenny Rogers' Guide to the Music Business has a lot of good advice for aspiring songwriters and may be available at your local library.
Never turn down a gig, play constantly, play every benefit you can, try to create a buzz. If you can pen one tune that goes viral you will have your toe in the door, and agents will solicit you.
The music business is such a contradictory concept, as illustrated in the movies Spinal Tap, and Fear of a Black Hat, which I urge you to watch in that order for a glimpse of the ups and downs.
Fear of a Black Hat has some advice:
Kicking the record company guy's ass. That was counter-productive.
You do not have to like Kenny Rogers' music to benefit from his book, he really gives a lot of insight and advice for aspiring artists.
I hope this information is helpful.