Saudi Arabia's King Fahd completed discussions with President Reagan yesterday amid a swirl of Middle East diplomacy that elicited cautious expressions of hope from the administration.

The developments centered on a "framework for common action" adopted Monday by Jordan's King Hussein and the Palestine Liberation Organization chairman, Yasser Arafat.

Details of the agreement were not made public, which generated widespread speculation and uncertainty.

Diplomatic sources said Egypt told the United States last week that Hussein and Arafat were working on a five-point formula for beginning a bargaining process with Israel.

As described by these sources, the formula appears to represent a substantial advance in the position of the Arab parties, especially the PLO, but it does not explicitly accept U.N. Resolution 242 and Israel's right to exist, as the United States and Israel have demanded.

It also provides for an international conference on the Middle East, which the United States and Israel oppose.

After the Reagan-Fahd meeting, White House spokesman Larry Speakes said, "Any declared intention to pursue a peaceful settlement of the Middle East conflict would be a constructive step."

He added what seemed to be two U.S. conditions, saying, "It is crucial . . . that the settlement be pursued at the table in direct negotiations, based on U.N. Security Council Resolution 242."

The five points, as described by the sources, are: Recognition of the principle of terrority-for-peace in accordance with Security Council resolutions. This is the basic agreement in Resolution 242, which is not mentioned by name. Recognition of the right of Palestinian self-determination in the framework of a Palestinian state within a Jordanian-Palestinian confederation. Solution of the Palestinian refugee problem in accordance with U.N. resolutions. Solution of the Palestinian question "in all its aspects." Pursuit of talks under the umbrella of an international conference on the Middle East, to include the United States, the Soviet Union, the three other permanent Security Council members and all parties to the conflict. How the PLO would be represented was being discussed when the five points were passed to the U.S. government.

Egypt is particularly anxious to encourage movement toward revival of the stalled Middle East peace process before the planned U.S. visit of Egyptian President Hosni Mubarak in mid-March. Egypt and Jordan have been cooperating closely since they resumed diplomatic relations last September.

The major purpose of Fahd's visit here is to urge Reagan to move vigorously in Middle East diplomacy in his second term. On arrival Monday, Fahd called for the United States to take a stand in support of "the just cause of the Palestinian people."

Speakes said an intimate 75-minute breakfast in the White House family quarters yesterday provided Fahd and Reagan an opportunity to discuss in detail their views on "the entire range of Middle East issues."

The two were accompanied at the breakfast by Secretary of State George P. Shultz, national security affairs adviser Robert C. McFarlane, Saudi Foreign Minister Saud bin Faisal and Ambassador Bandar bin Sultan.

Fahd also attended a luncheon given by the Arabian American Oil Co. and met with former presidents Gerald R. Ford and Jimmy Carter.

Speakes said Fahd is not likely to meet with Reagan again on this trip. The president plans to leave this morning for five days in California.

Widely varied reactions to the Hussein-Arafat "framework" accord was reported from the Middle East, ranging from optimistic official statements in Egypt to skepticism in Israel and anger among pro-Syrian PLO elements.

Mubarak called the accord "a good step forward." After a meeting with visiting Rep. Les Aspin (D-Wis.), Mubarak said:

"Egypt believes the joint strategy would make it possible for the United States to put pressure on Israel to sit with Jordan and the Palestinians around the negotiating table."

Mubarak's foreign-policy adviser, Osama el Baz, was in Jordan during the Hussein-Arafat talks.

Israeli Prime Minister Shimon Peres was quoted by Israel Radio as saying, "It is difficult to see in the Arafat-Hussein formula a peace formula because it does not reject terror and does not include recognition of Israel."

Foreign Minister Yitzhak Shamir, leader of the Likud faction of the Israeli unity government, said, "If the king of Jordan wants peace with Israel, he has to cut all ties with the PLO. We will never negotiate with Arafat or with the PLO."

One reason for continuing secrecy about details of the Hussein-Arafat accord appears to be its uncertain status among other PLO elements. Efforts to revise the PLO position toward negotiations with Israel have led to stalemate within the organization.