White House aides last December agreed to specific understandings with deposed shah Mohammad Reza Pahlavi on the eve of the former Iranian ruler's departure from the United States to Panama, according to administration sources.

The still-secret understanding covered such potentially controversial areas as the circumstances under which the former shah could return to the United States for emergency medical treatment and the U.S. role in maintaining his personal security.

They also dealt with less critical matters, such as American government aid to him in securing communications facilities and transportation, helping his children, who are in school in the United States and assisting the empress in visiting them, sources said.

Although the understandings were never formalized, both parties involved in the December conversation, held in the shah's quarters at Lackland Air Force Base hospital in Texas, made notes as to what was agreed to.

White House chief of staff Hamilton Jordan and White House counsel Lloyd Catler represented the president in the Texas discussions.

First information about the existence of the understandings came yesterday in a Wall Street Journal editorial, which described them as "codified in a nine-point document."

The editorial went on to state that "some of the shah's friends charge that eight of its nine points have been breached."

Administration sources strongly deny that charge.

They said yesterday that there is no single agreed-upon "list of obligations," but "various understandings to handle contingencies for what could arise in the future" when the shah left the United States.

"And we have not violated any of those," one government source stated yesterday.

The officials said the shah would have left the country in December even without assurances of future U.S. help. But, they added, the American undertakings were given partly to make it easier for him to go and partly because the Carter administration felt an obligation because of the shah's longstanding close ties with the United States.

They explained that, despite arguments about the shah's personal character and whether his reign in Iran was corrupt or brutal, the president felt he could not evade what one called "the reality of the close relationship that existed between him and every American president since the Truman administration."

As one source put it: "We are judged in our relations with other governments by how we stand by commitments and long-established relationships. In the shah's case, we couldn't say, 'You're out now. Tough luck, but you're now the Flying Dutchman. So get lost.'"

One official said yesterday that there is no expiration date on the U.S. commitments to the shah and that the administration will continue to carry them out, provided that they fall within the U.S. interpretation of what was discussed in Texas.

Since the December agreement, the official continued, there has not been a single request made by the shah or in his name by his friends that was not carried out if it was covered by the Carter administration's verbal assurances.

The current charges about a breach of faith, the officials contended, come from friends of the shah, whom they described as "probing on their own" and "not able to say that they are speaking on his behalf with his authorization."

When Cutler talked with the shah in Panama last week about his desires regarding where to have surgery to remove his spleen, the officials contended, the shah did not make a single mention in almost four hours of talks about wanting to come to the United States under terms of the emergency medical understanding.

The officials conceded that a major factor in the shah's unwillingness to ask to return here undoubtedly was his awareness that the administration didn't want him back in the United States and had made that point brutally clear.

Cutler was accompanied to Panama by White House chief of staff Hamilton Jordan, Carter's closest aide and confidant. However, in order to underscore the president's attitude about the shah coming back, Jordan pointedly stayed away from the discussions between Cutler and the shah.

In addition, some officials said, it was clear from the Cutler talks in Panama that the shah didn't want to do anything that might endanger the American hostages in Iran. They added that he also apparently was influenced by the clear desire of his wife to go to Egypt, where she finds the atmosphere more congenial and enjoys a close friendship with the wife of Egyptian President Anwar Sadat.

In describing the U.S. interpretation of the Texas understandings, the officials said the most important one involved the shah's potential emergency medical needs.

To avoid the controversy provoked by the shah's original admission to the United States last October, the understanding allowed the United States to question whether an emergency did exist and whether comparably adequate treatment was available elsewhere. To help verify these points, the United States reserved the right to have a physician of its choosing investigate the situation and make a recommendation.

But, one official stressed, in the event these conditions were satisfied and it was determined that the shah had a "legitimate emergency medical problem," the administration promised that "a request to come here would be received favorably."

In the case of the shah's current need for spleen surgery, the officials said, it was the U.S. position that the operation could be performed satisfactorily outside the United States. But, the officials insisted, if the shah had demanded to come here, the administration, despite its clear desire to keep him at arm's length, would have agreed to the demand.

The officials said another of the understandings covered the question of the shah's coming to the United States for nonmedical reasons, such as permanent or temporary residence. In that event, they said, the United States said only that it would consider such a request, but made clear in the Texas discussions that there was no obligation to admit him and that the U.S. preference was that such requests not be made.

Administration sources said the understandings reached at Lackland appear to have been disclosed this week as part of a new campaign of criticism against the Carter administration handling of the shah's departure from Panama.

The Journal editorial said, "Last week the shah's advisers drew up a formal request that the American government live up to its word."

According to administration sources, the key advisers around the shah are William E. Jackson, a partner in the prominent New York City law firm of Milbank, Tweed, Hadley and McCoy; Robert Armao, a New York public relations man who once worked for Nelson A. Rockefeller; Dr. Benjamin H. Kean, a New York-based specialist in tropical medicine, who describes himself as the shah's personal physician, and also has connections to the Rockefeller family; and Princess Ashraf Pahlavi, the shah's twin sister.

Jackson was not available for comment yesterday, according to his secretary in New York.

Armao is in Egypt with the shah, but his New York office released a statement saying that identification of him as "a source of various leaks relating to the shah, Panama and U.S. are without any basis in fact."

Princess Ashraf was also reported to be in Egypt.

Administration sources described the shah's twin as "very outspoken" in her criticism of the Carter administration's handling of her brother in Panama.

"She reacts firmly when the she thinks his interests are not being considered," a source said.

Those sources added, however, that they knew of no attempt by any shah advisers to draw up any request in Panama to the U.S. government on his behalf based on the Lackland understandings.

In a brief meeting yesterday with reporters, the president's national security adviser, Zbigniew Brzezinski, said, "We have no obligations or commitments to [the shah] as such . . ."

Asked about the remark later, a Brzezinski aide said his boss was quoted out of context and was not referring to the Lackland understandings. Another administration source commented, "I thought there was something wrong with his statement."