Brad Pitt and Angelina Jolie have reached a temporary custody agreement over their children for this summer season.

On Tuesday, court documents from the Superior Court of Los Angeles County revealed that the ex-couple will have joint physical custody over their six kids: Maddox, 16, Pax, 14, Zahara, 13, Shiloh, 12, and twins Vivienne and Knox, nine.

The court determined that the kids should maintain a relationship with their father because it would be “harmful” for them not to have Pitt in their lives. The court even noted that all children “are safe with their father” and it is “critical that each of them have a healthy and strong relationship” with both parents, Us Weekly has learned.

Given Maddox’s age however, he is free to go with either Pitt or Jolie. On the other hand, both actors were ordered “to explain the summer schedule” to their kids alongside two psychologists, the documents stated.

The “Tomb Raider” actress was ordered to give Pitt all of the personal cellphone numbers that he can contact to reach their children. Any conversation he has with them will be protected by the court, so Jolie won’t be allowed to monitor them.

Because Pitt and Jolie are busy doing separate projects, the court specified some terms for each of them in the coming weeks. For the June 8 to 17 period, Pitt is granted up to four hours a day to be with their kids in London, where Jolie is currently staying.

Pitt is ordered to spend time with each child at least twice during a 10-day period. It is also a must that psychologists should be present during these times. Also, Jolie should not be present during the hours when Pitt is allowed to spend time with their children.

For the June 27 to July 1 period, the “Fight Club” actor is given physical custody over the kids for 10 hours each day. Again, psychologists should be present during these times. Pitt will then be allowed to visit his kids for four hours a day for the July 8 to 14 period.

When Pitt returns to Los Angeles, he is given full custody over their children from July 21 to 29. On the final day, he is tasked to return the kids to Jolie’s care in London. He will see them again on August 11 and will be given time to be with them until the next court hearing on Aug. 13.

The court is asking Jolie to abide by the new summer custody agreement, or else she will risk losing custody over their children. The court also cleared Pitt of the child abuse accusation thrown at him over an alleged incident aboard a private plane in 2016, as per The Blast.

“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],” the judge pointed out in the court documents.

Reps for both actors did not respond to People when asked to comment on the latest development of the couple’s custody case.

Pitt and Jolie were married for two years, but they have been together for 12 years. They filed for divorce in September 2016 and have since been legally battling over the custody over their six children.

Brad Pitt Brad Pitt has reached a temporary custody agreement with ex Angelina Jolie. Pictured: The Hollywood actor-producer attending “Okja” New York Premiere at AMC Loews Lincoln Square on June 8, 2017. Photo: Getty Images/Jason Kempin