If it is an amicable agreement between you and the mother AND the boys want to live with you, then you don't have to do anything (apart from notify the Child Benefit dept and notify their schools, GP etc of a change of address).
You could go to the Family Court to apply for a residence order but to be frank you'd be wasting your money. If they changed their minds and wanted to go back to their mother, the Residence Order wouldn't be worth the paper it is written on, as in law, a child age 9 or over has the final say in who they live with in cases like this.