Brad Pitt and Angelina Jolie try to keep things civil in the wake of their shock divorce. The exes reach a new custody agreement.

Both Parents Are Important

The two Hollywood superstars shocked the world when they called time on their relationship a couple of years ago. They have now reached a temporary custody agreement for their six children.

The court has determined that it's imperative for the kids to have a proper relationship with their father, and have tasked Jolie with ensuring same.

"[It's] critical that each of them have a healthy and strong relationship [with both of their parents]," ruled legal documents obtained by Us Weekly.

Jolie, 43, and Pitt, 54, must plan their summer schedule to allow the World War Z star to have plenty of time with his kids.

Pitt will have physical custody of each of the five minor children, excluding eldest son Maddox, who's 16, for four hours a day, in London, from June 8 to 17. He must spend time with each child at least twice during this period, and Jolie will not be present.

He will then have custody for 10 hours each day from June 27 to July 1, as well as four hours per day from July 8 to 14. Once he's back in L.A., he'll have the kids from July 21 to 29 and is responsible for returning them back to Jolie in London thereafter. Jolie can have one phone call with the kids per day, at a time pre-agreed with Pitt.

Pitt's custody will resume on August 11, until the couple's next scheduled hearing two days later. Jolie is also responsible for providing her estranged husband with the children's phone numbers, so he can contact them freely. Jolie is not allowed to monitor exchanges between the kids and their father.

Focusing On What's Important

The two stars separated in September 2016. According to an insider, their divorce has been contentious, but they're focused on what's best for the children.

"This [divorce] has been a longstanding back-and-forth, and hopefully now there will be greater collaboration for the benefit of the kids. The kids have always been a priority for both parents," advised the source.

Jolie is running the risk of losing primary custody of the six kids if she does not comply with the court's ruling, to ensure they have a proper relationship with Pitt.

"If the minor children remain closed down to their father and depending on the circumstances surrounding this condition, it may result in a reduction of the time they spend with [Jolie] and may result in the Court ordering primary physical custody to [Pitt]," advised court documentation.

The ex-couple have six kids together: Maddox, 16, Pax, 14, Zahara, 13, Shiloh, 12, and twins Vivienne and Knox, both 9.

The kids are continuing their studies while Jolie films Maleficent 2 on location in London. Pitt is working on a new film and will juggle his time between London and California.