Leaders of the Warsaw Pact wound up two days of summit talks in Prague today with an offer to negotiate a nonaggression agreement with the North Atlantic Treaty Organization.

An official communique distributed by the Soviet news agency Tass said "the new major peace proposal" was a part of a political declaration adopted unanimously by the seven-nation Communist alliance.

Initial western assessments suggested that the offer could constitute a fresh propaganda gambit in Moscow's efforts to stall the scheduled deployment of new U.S. medium-range nuclear weapons in western Europe.

Because the text of the political declaration was not published today, western sources here withheld any firm assessments.

In Washington, President Reagan said the proposal would "be considered" but "would require consultation" with NATO. There was no official comment from the State Department, but officials said it appeared to be an old idea that had been rejected previously by western countries.

The text of the political declaration suggested that limited results were achieved in Soviet party leader Yuri Andropov's first summit with the top officials of Poland, East Germany, Czechoslovakia, Romania, Hungary and Bulgaria.

The document made no mention of economic issues within the Soviet Bloc, for example, the dislocations caused by the Polish crisis. The subject is believed to have been one of the main topics of discussion in Prague.

East European sources also pointed out that Romanian President Nicolae Ceausescu's desire for a detailed reexamination of economic arrangements between the Soviet Bloc countries was not mentioned in the communique and presumably was postponed for a later meeting.

The communique instead suggested that the seven delegations focused almost entirely on issues dealing with "the struggle for averting the danger of nuclear war, for preserving and strengthening international detente, for consolidating and strengthening" security and cooperation in Europe.

There was speculation in Soviet circles that the Warsaw Pact offer may be followed by proposals that could revitalize the 10-year-old Vienna talks between the two blocs on reduction of conventional arms in Europe.

At present, four sets of talks are under way concerning arms control and detente between the superpowers and within Europe. In Geneva, the Soviet Union and the United States are conducting two parallel sets of talks on reduction of strategic arms worldwide and intermediate-range nuclear forces in Europe. The Vienna talks between the Warsaw Pact and NATO concern reduction of conventional forces in Central Europe and the Helsinki review talks in Madrid focus on the implementation of the Helsinki accords on security and cooperation signed by 35 nations in 1975.

After the conclusion of the Warsaw Pact summit, Andropov said the participants agreed that "the further consolidation of our unity, our economic and defense potential, should come as a response to the designs of aggressive imperialist circles to push socialism back."

Alluding to the crisis in Poland, Andropov said that despite "the negative factors which showed themselves at the begining of the 1980s, the international position of the socialist community remains strong and reliable."

But, he added, "we have enough good will and determination to move step by step toward stronger European security and improved world political atmosphere. We have sufficient strength to counter imperialism's military threat."

The proposal to negotiate a nonaggression pact between the two military alliances had been advanced unsuccessfully by the Soviet Bloc 25 years ago. Today's communique said the decision of the Prague summit will be submitted to all participants in the 35-nation Helsinki Conference on European Security and Cooperation.

The communique said that special attention of all participants would be drawn to the Prague summit's call for the two military blocs to "conclude a treaty on the mutual non-use of armed force and the maintenance of relations of peace" between them. The proposed treaty would be "open to accession by all other states."

The summit decided that the foreign ministers of the seven countries should take steps on ways to translate "into reality" the proposed nonaggression pact with NATO.

[A Reuter dispatch from London quoted Western sources as saying Moscow first suggested similar treaties between members of the two blocs in 1955 and had proposed an inter-alliance treaty as far back as 1958. Officials said efforts to work out an arms-control agreement with the Warsaw Pact had not been successful and the idea of preserving peaceful relations between the blocs was already enshrined in the Helsinki Final Act.]

[A senior analyst said that nonaggression pacts were regarded as dubious because "similar agreements in the past such as the 1939 Nazi-Soviet pact didn't have a very good track record."]

The question of military spending at a time of sharp East-West tensions is also believed to have been a topic of discussion. East European sources here said earlier that most Warsaw Pact members, suffering from stagnant economies and beset by foreign debts, have argued against increased military spending.

Four years ago, Romania refused to endorse a call for bigger arms budgets. Well-informed sources here speculated that this time it would be even more difficult to obtain support for such proposals from Romania as well as Poland, Hungary and even some other members.