Will it stand up in court or with police should someone violate the agreement without pursuing it in an open court case?
Of and by itself, it is not a valid determination of custody. The court enters an order, usually giving both parents legal custody and one parent physical custody. An agreement for custody should be by submitting a stipulation to the court, which will enter it as part of an order.
It is the order which is enforceable.
I suggest you contact a family law attorney to guide you through the process. Your state and local bar associations should be able to provide referrals.
A written, signed agreement is a contract, not a court order. It is treated as such. Police do not go around enforcing contracts. To get the police involved in this type of situation, you need a court order. A court order, whether agreed or not, gives the police the authority and duty to enforce the terms in the order.
If you want to take your written agreement to the court, there are ways to get it approved as an order. That gives both parties the ability to use police to enforce the terms in it.
Family Law Attorney
I agree with the prior answers, you need a court order for it to be enforceable by the court and possibly the police. What you have is not enforceable by either. Regarding the police, they will not always help you enforce a court order for custody. Some departments are more helpful than others. A number of departments simply say that since this is a civil matter, they cannot help. If the police won't help enforce the court order (once you have one), you would need to file a motion for contempt with the court.