The Soviet news agency Tass yesterday accused the United States of secretly encouraging Israeli settlements on the occupied West Bank of the Jordan River while publicly opposing them.

Israeli Prime Minister Menahem Begin's government recognized three previously illegal West Bank settlements Tuesday, immediately after Began returned from talks in the United States with President Carter.

Both Carter and U.S. Secretary of State Cyrus Vance publicly called the Israeli an obstacle to peace in the Middle East.

Tass said the timing of the Israeli decision was "noteworthy" and described the Carter administration's criticism as an effort "to promote the American image" in Arab nations.

"While condemning Israel's action in word, the United States encourages them in deed," the Tass commentary said.

The Israeli action also came under fire at the United Nations, where 20 Arab delegations agreed to fire a protest today in letters to Secretary General Kurt Waldheim and the Security Council.

In Tel. Aviv. however, Israeli Foreign Minister Moshe Dayan defended the settlements as "productive and constructive for peace" because they bring Jews and Arabs together.

In another Middle East development, the Kuwaiti foreign minister. Sheikh Sabah Ahmad, said that Egypt and Libya will announce an agreement next week regarding a solution to recent border clashes.

Kuwait had sought to mediate the dispute that erupted into six days of fighting last week and Ahmad said both Egyptian President Anwar Sadat and Libyan leader Muammar Qaddati had responded by expressing "a sincere desire" to end hostilitics.

The Libyan government maintained official silence on peace moves, but the official Libyan Arab Revolution News Agency reported that Libyan newspapers had attacked the United States for agreeing to sell military aircraft to Egypt and had suggested that the United States had encouraged Egypt to engage in hostilitics.

Libyan Foreign Minister Abdel Salam Tureiki told reporters in Paris that Egypt should be working to solve its domestic economic and social problems rather than fighting an Arab neighbor. Tureiki was in France on an official two-day visit.

Elsewhere in the Middle East there were these developments:

Twenty-eight persons were wounded when a bomb exploded in a market in Beersheba in the Negev Desert. Palistinian guerillas claimed responsibility. It was the third bombing in Israel in 24 hours.

The Middle East News Agency reported in Cairo that an Egyptian court sentenced 28 persons to life imprsonment for taking part in street riots on Jan. 18 and 19.