President Carter and Egyptian President Anwar Sadat, after two days of talks in the seclusion of Camp David, returned to Washington yesterday afternoon with an agreement for resumed U.S. shuttle diplomacy in the Middle East.

In a written statement agreed to by officials of both governments, it was announced that Assistant Secretary of State Alfred L. Atherton Jr. will return to the Middle East soon to continue work on a possible "declaration of principles" that could form the basis for resumed peace negotiations.

The Egyptian-Israeli political talks were abruptly suspended Jan. 18 by Sadat, throwing a cloud of pessimism over the Middle East peace negotiations.

Sadat disclosed in an interview last night that in addition to asking Carter for American military supplies for Egypt, he requested weapons for "my fellow Africans" - explicitly mentioning Somalia and Chad.

On his way to the United States, Sadat told NBC-TV interviewer David Prinkley, he received "urgent messages" from the presidents of those two countries.

Somalia is engaged in expanding warfare with Ethiopia, which is supported by Soviet weapons and several thousand Russian and Cuban military advisers. Chad is fighting a Libyan-backed rebel offensive supplied with Soviet weaponry. Until now, the United States had declined to become involved in either conflict.

Sadat said Carter told him "he must go to Congress" with these arms requests.

Sadat was unusually subdued in the television interview, apparently responding to Carter's urging to avoid sudden, dramatic [WORD ILLEGIBLE] of policy through "media diplomacy." He reiterated his basic positions on an Arab-Israeli peace settlement, seemingly now more disposed to quieter diplomacy.

Earlier on the South Lawn of the White House after the 35-minute helicopter flight from the presidential retreat in Maryland's Cotoctin Mountains, Carter told reporters that he and Sadat are in "complete agreement to work without ceasing" toward a peace settlement. He promised to make "a much more definite" statement on the talks following his final meeting with Sadat at the White House on Wednesday.

The usually talkative Sadat stood by Carter's side but did not speak.

The written statement issued by the White House, like the president's remarks to reporters, was couched in generalities that shed little light on the substance of the Camp David talks.

According to American officials, Carter took Sadat to the privacy of Camp David in the hope of convincing him to resume peace talks with Israel and work for a compromise on the Palestinian issue.

The two leaders met for four hours yesterday and delayed their departure for Washington by an hour so they could continue the session.

The declaration of principles that Atherton is to continue to work on would have to include acceptable compromise language on the issue of "self-determination" for the Palestinians in the Israeli-occupied territories along the West Bank of the Jordan River and in the Gaza Strip.

Carter, according to American officials, is advocating that Egypt and Israel begin seeking a compromise based on the language that he and Sadat used when they last met on Jan. 4 in Aswan, Egypt.

That deliberately ambiguous formula called for a settlement that would "enable the Palestinians to participate in the determination of their own future."

Israel objects to the phrase "self-determination," considering it a code term for the independent Palestinian state it has vowed never to accept.

The seven-paragraph statement issued by the White House addressed in general terms the impatience of Sadat, who blamed Israeli intransigence for the breakoff of the Egyptian-Israeli political talks Jan. 18 in Jerusalem. But referring to the United States' role in the negotiations as "a friend of both sides," it gave no sign that Carter had agreed to put pressure on Israel to resume the talks.

"As a result of their extensive talks," the statement said, "President Carter feels that he has a better understanding of President Sadat's concerns about the need for the peace process to move forward without delay."

The statement also said that the two leaders "reviewed the reasons for the slow pace of progress and the factors which have hampered the achievement of substantive agreement. They found themselves in accord that efforts should remain focused on creating conditions which are conducive to the achievement of tangible results and the broadening of negotiations looking toward the realization of a comprehensive settlement."

The statement said Carter and Sadat will "further refine their views" in talks over the next three days between American and Egyptian officials and, on Wednesday, between the two presidents themselves.

The helicopter that brought the two leaders from the mountains landed on the South Lawn at 4:40 p.m. yesterday.

Carter and Sadat, with their wives slightly behind them, walked to a waiting microphone, where only Carter spoke.

He described the two days of talks as "very enjoyable" and declared that he and Sadat had reached "a renewed commitment" to work for peace.

Both presidents were dressed casually and neither wore a tie.

After the brief statement, Carter put his arm around Sadat as he escorted him the few steps to the Egyptian president's limousine.

Two weeks ago, Carter called for a reduction in the number of public statements concerning the Middle East and a return to private diplomacy. That was clearly the American purpose during the two days of talks with Sadat. There was a virtual news blackout at Camp David, capped by the surprising decision by Sadat not to speak at the White House at the conclusion of the talks.