Angelina Jolie and Brad Pitt Strike Temporary Custody Deal, Includes Therapy and Random Drug Testing

Angelina Jolie and Brad Pitt have struck a temporary custody deal, ET can confirm.

Angelina Jolie and Brad Pitt have agreed to a temporary custody deal, ET can confirm.

After the Department of Children and Family Services made its recommendations, Jolie and Pitt came to a temporary agreement that lasts until Oct. 20, a source familiar with the deal tells ET. The agreement is voluntary and is a DCFS safety plan -- also known as a structured decision making (SDM) safety plan -- which is standard practice in any ongoing child welfare investigation.

Jolie and Pitt each volunteered to participate in individual counseling, and Pitt also agreed to undergo drug and alcohol testing, though he was not required to, sources tell ET.

"She is only concerned with the health and safety of her children, that is how she feels at this moment," a source close to the situation says of 41-year-old Jolie.

WATCH: EXCLUSIVE: Angelina Jolie & Brad Pitt Divorce a 'Long Time Coming' -- Here's What Went Wrong

Full physical and legal child custody has not been determined yet, according to sources close to the situation.

Pitt's first visit with his children will have to be with a therapist present, who can then either allow the actor future unmonitored visits, or insist on being present when he's around the kids, TMZ first reported.

The public information officer for the Los Angeles County Superior Court tells ET they have not received court documents pertaining to the Pitt-Jolie child custody case.

A source close to the Pitt-Jolie child custody dispute told ET on Thursday that camps for the A-list stars had recently been having "productive discussions."

"The fact that things have quieted down is a good sign for everyone," the source noted.

The source also previously told ET that while authorities did not require 52-year-old Pitt to take an earlier drug test, he voluntarily took one as a sort of preemptive strike in the custody battle process.

Pitt wanted to resolve his issues with Jolie "amicably and privately," according to the source, adding that he had become frustrated by the "smear campaign" being lodged against him.

ET confirmed on Thursday that Jolie's team was consulting with world-renowned crisis manager Judy Smith, the real-life inspiration for Kerry Washington's character, Olivia Pope, on the hit ABC drama Scandal. Earlier, a source close to the Pitt-Jolie situation told ET that the actress' closest female friends, Lady Arminka Helic and Chloe Dalton, had been advising Jolie and had been "fueling the actress' aggressive approach against Pitt" from the beginning.

But Jolie wasn't the only one beefing up her representation. Last week, a source told ET that a New York-based strategic communications firm had been asked to advise Pitt. The actor also enlisted Beverly Hills attorney Lance Spiegel as one his lawyers, who's previously represented many celebs in family law issues, including Eva Longoria in her divorce from Tony Parker.

Prior to their split, the power couple did not have personal public relations representatives.

WATCH: Angelina Jolie and Brad Pitt Divorcing -- Everything They've Ever Said About Their Marriage

Jolie had asked for physical custody of their children in her divorce filing earlier this month -- 15-year-old Maddox, 10-year-old Shiloh, 12-year-old Pax, 11-year-old Zahara, and 8-year-old twins Vivienne and Knox -- and listed their date of separation as Sept. 15. The two were married for two years, but had been dating since 2004, after meeting on the set of Mr. & Mrs. Smith while Pitt was still married to Jennifer Aniston.

Watch the video below for a timeline on Pitt and Jolie's relationship and subsequent shocking split.