This is a complicated question.
It can be as easy as declaring on the internet, “I am an agent” and hanging out your own shingle.
However, I wouldn’t recommend that. And if you did it I wouldn’t recommend any writers signing with you.
My suggestion in terms of becoming an agent is
1. Get an internship at an agency. We have our interns come into the office because you learn a lot that way, but some agencies take remote interns too.
2. Apply to be an assistant at an agency.
3. Either grow to be an agent at that agency or apply to be an agent at another agency.
This is a very network based industry, so the more connections you make in this process, the better.