Getting custody away from a parent without an agreement is extremely difficult because in the United States there is a constitutional right for a parent to decide what's best for his or her kids. So, the best option is to get an agreement to appoint you sole managing conservator. If no agreement can be reached, then you will have to prove to the court that the child is in some sort of physical or psychological danger. This is difficult when the child is staying in your home for the time being! The main ray of hope is that the longer the child stays with you, the better your chances are.
You will need the help of an experienced family law attorney to help you understand your rights. Good luck.
Sign up to receive a 3-part series of useful information and advice about child custody law.