You can handle child custody in a separation agreement, but we don't generally recommend it. A court order is a stronger document. And, should a dispute arise about custody, without a court order, your only recourse is to sue under breach of contract. Whereas, with court-ordered custody, you can seek contempt powers of the court. There is nothing more important than children and their stability, so you want the strongest document possible, which is a court order.