For the Carter administration, the announcement of a final agreement with Tehran brought a rush of euphoria that America's prolonged national anguish was coming to an end.

This morning, the White House announced that Carter is preparing to fly to West Germany, pending clearance of the hostages from Iranian air space, but intends to be present for the inauguration of his successor.

The announcement on terms for release of the 52 American hostages came at the end of a tension-filled cliff-hanger day, termed a "day of chills and thrills" by Louisa Kennedy, wife of hostage Moorhead Kennedy.

For more than eight hours preceding the final, early morning announcement, top officials of the Carter administration met in nearly continuous session in the Oval Office sending and receiving messages to Iran through the U.S. negotiating team in Algiers and, in long periods between messages, just waiting.

Amid caution and some confusion, Washington officials steadfastly declined throughout the long day to say that a deal had been completed, despite word from Tehran early Sunday that agreement had been reached on "all the terms."

A little after 11 p.m. a high White House official reported that a final text, meeting the approval of the United States, had been in Tehran awaiting action there for several hours. Up to that point, officials said the delay was due to the difficulties of translation into the languages as well as problems of explanation to the Iranians of some of the complex provisions fof the terms for the hostages' release."The substantive of the terms for the hostages' release. "The substantive deal was done" early yesterday, according to a government source, "but then the mechanical side got kind of hung up."

The difficulty, he said, "was that the people in Iran had never read the details of an escrow account. We have had to explain to them what has to be done." As the source anticipated, the explanation apparently did not prove to be a major problem, although it was time-consuming.

The agreement hammered out with Iran calls for two escrow accounts, to be held by a third party -- in this case the Bank of England -- until each participant in the deal fulfills his obligations. At that point the holder of the funds, like a neutral party two has been holding a bet, turns over the money as directed.

While the legal and procedural education of the Iranian leaders continued, the exact language of the agreement was translated into English, Persian and French texts. Most of this work was done in Algiers.

A White House official said Carter during the day Sunday and empowered Deputy Secretary of State Warren Christopher, who is in Algiers, to give U.S. approval to additional parts of the draft agreement with Iran, which has been hammered out in indirect negotiations over the past two months. The official said Carter would still have some actions of his own to take, apparently the signing of executive orders unfreezing Iranian assets and implementing other U.S. pledges in exchange for the hostages' release.

The 52 Americans, after medical examinations in Tehran by a team of Algerian doctors, are expected to be flown to Algiers in Algerian aircraft, a flight of more than six hours. U.S. medical evacuation aircraft are expected to pick them up there for the 2 1/2-hour flight to Wiesbaden, West Germany, their temporary home for three to five days of recuperation.

Earlier Sunday, Vice President Mondale, speaking on "Issues and Answers" (ABC, WJLA), said two differences remained to be worked out with Iran. He described one as "a minor difference" in the dollar amount of the overall sum of Iran's assets to be held by a third party, the Bank of England, as interim step awaiting the hostages' release.

The other remaining difference, the vice president said, was "a legal problem over certain disputed claims." White House chief of staff Jack Watson, appearing on "Meet the Press" (NBC, WRC), said this problem concerned the nature of the arbitration arrangements to resolve U.S. legal claims against Iran.

Carter, spending his final weekend at the presidential retreat at Camp david, generated high expectations by flying suddenly back to Washington at 12:42 p.m. to take personal charge of the Washington end of the hostage saga.

Carter, Mondale, Secretary of State Edmund S. Muskie and other senior officials were in frequent touch by telephone with Christopher, head of the U.S. negotiating team that has been in Algiers since Jan. 7. Christopher, in turn, was reported to be busily exchanging messages with Iran through the Algerian government.

The almost continuous White House meetings throughout the day, in addition to the news from Tehran, provided clear signals to the American public and the growing crowds of waiting reporters and television crews that an end to the long drama was near.

Reagan, apparently eager to see a resolution of the overseas problem that bedeviled Carter, told reporters as he left for church services yesterday morning that "if they [the Iranians] deliver the hostages, I'll sign anything."

Asked to amplify his remark after the services at the National Presbyterian Church, Reagan said, "I meant that if there was an agreement pending and they had insisted on my signature before they would release the hostages. . . . What I really meant was I would sign that agreement when they released the hostages."

Responding to a question, Reagan said he had not intended to change his earlier position that he would not provide "a blank check" for the arrangements being made by the Carter administration, though he approved those arrangements to date.

About 3:30 p.m., Carter telephoned Reagan to give him a brief update from the Oval Office on the most recent steps in the negotiations with Iran. There was no report of Reagan's private reaction.

The next to last full day of the Carter administration was one of the most suspenseful, due to the overwhelming sense that the long personal ordeal of the hostages, and the national ordeal of their fellow Americans, were finally coming to an end.

At the first news from Iran announcing an agreement came over the wires and radios, the press rooms of the White House and State Department began to fill with reporters. Regular television programming was repeatedly interrupted by special programs and special bulletins on the hostage issue, each new statement or broadcast adding to the air of anticipation and the crowd of reporters.

As administration officials explained it, this will be the sequence of events in the last of the hostage drama:

The United States and Iran will agree on the details and text of the terms of the hostage release. In essence, Iran will obtain its frozen assets, a promise of noninterference in Iranian affairs and agree to arbitration of pending legal claims, while the United States will obtain release of the captive Americans.

The United States will order the transfer to the Bank of England of about $4 billion in Iranian bank holdings plus about $2.5 billion in funds and gold which had been held by the Federal Reserve Bank in New York. The Bank of England will keep these assets during an interim period. Iran, in turn, will transfer several billion dollars to "escrow" accounts to pay off loans of American banks and pay any claims that eventually are validated by an independent claims commission.

As the American hostages leave Iranian air space, the Bank of England will release Iran's funds of Tehran's use.

Carter administration officials continued to declare yesterday that the American taxpayers will not bear any of the bill for the Iranian agreement. "We are not paying a dime of American money for the return of these hostages. . . . This is their money, which we have frozen, that we will be returning to them," Mondale said.