LOS ANGELES — Angelina Jolie Pitt and Brad Pitt have reached a temporary custody agreement that will allow the actor to visit with his six children, sources said Friday.

Two sources familiar with the agreement but not authorized to speak publicly said the agreement will be in place for three weeks. It calls for Pitt’s first visit with his children to be monitored by a therapist, but that may not be a requirement for subsequent visits.

The sources say both actors have agreed to undergo individual counseling.

Calls to the offices of Pitt’s attorney, Lance Spiegel, and Jolie Pitt’s attorney, Laura Wasser, were forwarded to recorded messages stating their firms do not comment on clients.

Jolie Pitt filed for divorce on Sept. 19, and her attorney said the following day her decision was “for the health of the family.” Her filing sought sole physical custody of their six children, who range in ages from 8 to 15.

The temporary agreement has not been filed with the court, and Pitt has not yet responded to the case.

The FBI has said it is gathering evidence about allegations Pitt was involved in a dispute on a private flight with his family on Sept. 14, although the agency has not opened a formal investigation. Sources familiar with the allegations have said they center on the actor’s treatment of his 15-year-old son, Maddox.

Several news outlets have reported that the incident was being investigated by the Los Angeles County Department of Children and Family Services, but the agency said it could not confirm whether it was involved.

They were one of Hollywood’s highest-profile couples.