Soviet President Leonid Brezhnev gave a sternly worded speech on foreign policy to the armed forces chiefs today, indirectly but clearly forecasting a new wave of Soviet weapons modernization to counter an "unprecedented" American arms buildup.

Abandoning the conciliatory tone of his recent public pronouncements, he accused the Reagan administration of "adventurism, rudeness and undisguised egoism" and said its policies are "threatening to push the world" to a nuclear war.

While defending his "peace policy," Brezhnev said that the international situation continues to deteriorate and that "new questions" that have appeared "must be solved without delay."

He placed a special emphasis on competition in the area of military technology that, he said, has "sharply intensified, often acquiring a fundamentally new character.

"Lagging behind in this competition is inadmissible," he continued. "We expect our scientists, designers, engineers and technicians to do everything possible to resolve successfully all tasks connected with this." The country will spare "nothing" to keep the armed forces "up to mark" and give them "most advanced weapons and military hardware," he added.

Both the speech and the forum in which it was delivered suggested that a major reassessment of Soviet security needs was under way before the coming plenum of the Communist Party Central Committee. The Nov. 15 plenum is to adopt the 1983 budget and observers here expect a significant boost in military outlays.

Brezhnev was flanked by his five senior Politburo colleagues as he addressed an audience made up of all top Defense Ministry officials, all Soviet marshals, the commanders of all services, all regional Soviet commanders as well as commanders of Soviet forces abroad, and the top echelon of the policy directorate of the armed forces.

Diplomatic observers could not recall a similar consultation in recent years between the top political and military leaders. They suggested that the somewhat defensive tone of Brezhnev's speech was in response to behind the scenes criticism by the military leaders of Moscow's inadequate preparations to counter the American arms buildup.

Brezhnev appeared to go out of his way to reassure the military chiefs by asserting that the Central Committee would adopt "measures to meet all your needs." He called for improved readiness of the armed forces, adding that they would be given the tools provided by "the latest achievements of science and the art of war."

The Soviet leader made no reference to the current Soviet-American arms control talks in Geneva and instead talked about "practical preparations" under way for the deployment of new American medium-range nuclear missiles in Western Europe.

This section of the speech was interpreted by Western diplomats as a broad hint that the Soviets may revise their decision to freeze unilaterally the deployment of their new SS20 medium-range nuclear missiles targeted at Western Europe. When the freeze was announced last March, it was linked to the West's expected reciprocity in delaying "practical preparations" for the deployment of U.S. arms.

There have been indications here that the military establishment was not entirely happy with that decision and the subsequent Soviet pledge, also made unilaterally, against "first use" of nuclear weapons in general.

During his speech, which was carried later over national television, the Soviet leader linked deteriorating Soviet-American relations to hopes for a rapprochement with China.