Full disclosure: I do not have a literary agent. I do, however, believe they are invaluable assets.
Delilah S. Dawson has illustrated here how to get one. It is not easy, and you do have to write your ass off, but this information is gold.
How to Get an Agent