President Carter yesterday said he has obtained assurances from Moscow that the Soviet Union has not placed and will not place offensive weapons in Cuba in violation of the 1962 U.S.-Soviet agreement.

The president made the disclosure to a televised news conference in response to a question about the recent Soviet supply of Mig 23 warplanes to the Caribbean nation.

Carter added that the United States will continue to monitor very carefully "the quantity of weapons sent there and the quality of weapons sent there to be sure that there is no offensive threat to the United States possible from Cuba."

Informed sources said the number and capabilities of new weapons are factors in diplomatic talks intended to clarify the limits of permissible Soviet military supplies to Cuba. Soviet officials have described the dozen or so Mig 23s recently supplied as defensive in purpose and not equipped to carry nuclear weapons.

Administration officials said discussions with Moscow on the issue are not complete, but expressed optimism that they will be wound up successfully within a few days.

The 1962 Kennedy-Khrushchev understanding, which helped resolve the Cuban missile crisis, bars the Soviets from placing offensive weapons in Cuba. Carter said any violation would be "a very serious development."

Renewed public controversy and diplomatic discussions on weapons in Cuba followed press disclosure two weeks ago of top-level Pentagon concern about the supply of Mig 23 aircraft. Carter said the United States has been observing the new model warplanes there since late last spring.

On the Middle East, Carter said he has been "dissatisfied and disappointed" at the protracted nature of the U.S.-sponsored negotiations between Egypt and Israel on a peace treaty.

He added that he is "somewhat discouraged," but expressed continuing belief that both sides want to reach an agreement and thus his efforts are "very likely to be fruitful."

As Carter noted, he is scheduled to receive a personal message from Egyptian President Anwar Sadat, brought by Prime Minister Mustafa Khalil, at the White House today. A message from Sadat to Israeli Prime Minister Menachem Begin was delivered in Jerusalem yesterday, through U.S. diplomats and Senate Majority Leader Robert C. Byrd (D-W.Va.), who is traveling in the area.

The relatively pessimistic tone of Carter's remarks gave no hint of an impending breakthrough on the major remaining problem, the relationship between Egyptian-Israeli normalization of relations and parallel progress toward resolution of the dispute between Israel and Palestinians on the West Bank and Gaza Strip. Carter termed this issue "very difficult" in describing the current situation.

There was no disclosure either in the Middle East or here of the contents of Sadat's messages to Carter and Begin. The airing of negotiating details in the press during the seven weeks of the treaty talks was said by Carter to be part of the reason for the difficulties. He said the disclosures were due in part to domestic political situations in the two nations.

There have been recurrent suggestions that another meeting between Sadat and Begin, perhaps at the time when the two leaders are jointly to receive the Nobel Peace Prize in Oslo, will be necessary to complete the treaty. Egypt's semi-official Middle East Agency reported yesterday, however, that Sadat will not go to Oslo on Dec. 10 to receive the award, but plans to send an aide instead.

Addressing a broad range of foreign policy matters in answer to questions, the president also told his news conference:

He has been concerned about over-reliance on electronic means of intelligence to the detriment of open political reporting and correct assessments of available information. He confirmed that he had complained to senior aides about the quality of intelligence after the failure of U.S. agencies to predict the turmoil in Iran.

Carter said he had ordered the National Security Council, State Department and Central Intelligence Agency to "see how we could improve the quality of our assessment program, and also particularly political assessments." He said he had been generally pleased by the intelligence reaching his desk, but that "there is still some progress to be made."

The United States has no intention of interfering in the internal affairs of Iran and does not approve of any other nation's doing so. This appeared to be another response to Soviet leader Leonid I. Brezhnev's recent public warning against U.S. interference with the strategic Persian Gulf country, which borders on the Soviet Union.

Asked if the shah of Iran is "justifiably" in trouble, Carter said he thought the shah clearly understands the roots of the troubles, which, he implied, resulted from the pace of change.

"We trust the shah to maintain stability in Iran, to continue with the democratization process, and also to continue with the progressive change in the Iranian social and economic structure," Carter said. He also expressed confidence in both the shah and the Iranian people.

The United States is watching "with great interest" the changing internal situation in China. Carter said he continues to seek normalization of diplomatic relations with China but, as in the past, gave no timetable. In the meantime, relationships with China are improving, he said.

Despite criticism from former president Nixon, the administration's human rights policy is right, has had good effects and will be tenaciously maintained.

The basic strategic policy of nuclear deterrence will be maintained, even as improvements are made in weapons systems and command and information systems. He made the comment in response to a question prompted by a New York Times report that the administration is moving toward "a drastic revision" of nuclear strategy which envisions an enhanced capability to fight what are described as "limited nuclear wars."