How to find an agent when you don't already have one
The answer to this question is so simple - there is no chicken and egg aspect at all. In today's society, there are so many avenues and paths a professional can take to either acquire an agent, or secure work completely seperately.
Nowadays, one way of acquiring an agents interest is to simply have footage/material of yourself recorded; whether that be video footage of a dance combination (in class with the teachers permission) or anything that shows you off well, to audio material of you singing a song that shows you off well vocally. This footage/material can then be posted and shared on casting websites such as this, where agents have access to it at the click of a mouse. It might mean writing to agencies, asking if their books are open, and if they are, asking if they would be interested in seeing/hearing your material, which could then lead to a meeting and/or possible representation, but either way, having footage of yourself is a great way to gain interest. Another way is to simply create your own showcase, obviously if possible, but putting on a simple review or showcase type performance at a local bar/studio space, and inviting agents to come and watch is a very surprisingly effective way of gaining interest; essentially creating your own work.
This leads me on to the fact that your own work can be acquired without the help of an agent. Speaking personally, I have many friends who were not signed after drama school, yet all went on to work regularly and get their names out there, including off west end shows and regional pantos, to Chanel 5 documentaries, all through the use of casting website hunting and applying for things themselves. So an agent is not necessary at all, granted it may be a benefit in the long run, but it certainly isn't needed when starting out, as being your own agent can be just as efficient.
So in conclusion, neither the chicken or the egg came first in this situation, as what comes first is completely up to you in this profession.
I hope I helped!