The European allies of the United States agreed today "not to undermine or undercut" the U.S. embargoes on grain sales, high-technology exports and commercial credit to the Soviet Union in response to the Soviet invasion of Afghanistan.

But the allies, led by France, West Germany and Italy, did not agree to significantly reduce their own existing trade with the Soviets. Instead, they promised to avoid taking advantage of gaps created by the trade and credit cutoffs announced by the United States and Canada and expected later this week from Britain.

A large number of the allies also expressed interest in joining the United States, Canada and Britain in trying to convince world public opinion that next summer's Olympic Games should be moved from Moscow if the Soviets do not withdraw their troops from Afghanistan. In agreeing to study one idea further, however, they recognized the strong opposition to this from the dependent national and international Olympic committees, who control the games.

They also discussed ways of joining the United States in providing economic and military aid to Pakistan to help protect it from Soviet encroachment and expressed concern about the security of Yugoslavia.

Officials said Yugoslavia, where 87-year-old President Tito is seriously ill, was mentioned frequently at today's meeting of the 15 North Atlantic Treaty Organization nations. But no detailed analysis was made of Yugoslavia's ability to continue steering a communist course independent of the Soviet Union after Tito is gone. No clear successor has emerged in Tito's 35 years of rule.

The nine members of the European Comon Market, who also met here today, decided to try to speed up negotiations to give Yugoslavia favored trading status, possibly bringing it closer to Western Europe.

U.S. Deputy Secretary of State Warren Christopher said tonight he was "encouraged in general terms" by today's discussions in the simultaneous meetings of NATO and the Common Market, eight of whose members also belong to NATO.

[New Zealand, a big exporter of meat to Iran, said it would not join sactions against Iran since they exclude food and medicine. Australia ordered a Soviet research ship to leave Australian waters today, and Portugal said it would undertake a "complete reexamination" of its policy toward the Soviet bloc, wire services reported.]

Despite his optimistic comments, Christopher came away with less European support for President Carter's tough anti-Soviet stance than he had sought. He winds up his consultations in European capitals with stops in Bonn tonight and Paris tomorrow. He was in London and Rome Yesterday.

Today's NATO and Common Market statements were less combative in their criticism of the Soviets than Carter's statements have been.

The allies, according to the official statement of NATO Secretary General Joseph Luns, "denounced" the invasion, gave their "full support" to yesterday's United Nations call for Soviet withdrawal from Afghanistan, and expressed determination to show the Soviets that the allies are "convinced that actions of this sort cannot be taken with impunity."

After the French reportedly objected to language in a proposed Common Market statement "condemning" Moscow for invading Afghanistan, the final statement said its members "take the view that the Soviet intervention constitutes a flagrant interference in the internal affairs of a nonaligned country belonging to the Islamic world and constitutes, furthermore, a threat to peace, securityand stability in the region, including the Indian subcontinent, the Middle East ad the Arab world."

Both statements reflected the prevailing French and West German view that the Soviet action does not constitute so much a direct threat to Europe or NATO as a "serious blow" to detente and a danger to nonaligned nations around the Soviet Union. TheEuropeans hope to use the Afghan crisis to woo nonaligned nations away from the Soviets and strengthen relations with those already close to the West, such as Pakistan and the oil-rich Islamic Persian Gulf states.

The Common Market nations -- Britain, France, West Germany, Italy, Denmark, Belgium, Holland, Luxembourg and Ireland -- formally agreed today to avoid undercutting the U.S. embargo on grain sales to the Soviet Union with its own grain exports to Eastern Europe. They also temporarily extended a ban on subsidized sales of surplus Common Market butter to the Soviets. Dairy exporters France and Denmark are reluctant to make the ban permanent.

The NATO nations -- all the Common Market members except Ireland, plus Portugal, Greece, Turkey, Norway, Iceland, Canada and the U.S. -- also agreed not to undercut actions any of the others have taken or will now take in response to the Soviet invasion.

Except for Britain's expected restrictions on trade and commercial credit, most of the actions still to be announced by the European allies are expected to be symbolic diplomatic moves, including curtailing official contacts and cultural exchanges, plus possibly creating pressure to move the summer Olympics away from Moscow.

"Wherever I have gone in Europe," Christopher said tonight, "there is a strong and growing tide of questions on whether it is appropriate to hold the Olympics in the Soviet Union."

Saying that the focus of this discussion has now changed completely from boycotting the Moscow games to trying to move them, Christopher said this would require mobilizing public opinion to influence the Olympic committees. "It is appropriate," he said, "for governments to ask the public's opinion on this."

Christopher said he also found "a good measure of support" among the allies for "withdrawing or restricting their trade subsidies or credits" to the Soviet Union. This is likely to limit to present levels of credit but not appreciably reduce the European allies' trade with the Soviets.

It is still considered unlikely that the allies will significantly reduce the sizable amount of computers, electronics, chemicals, oil drilling equipment and construction technology that West Germany, France and Italy in particular sell to the Soviets for oil, gas and uranium.

The Afghanistan crisis dominated today's meeting of the allies. But in his other contacts with the major European allies this week, Christopher will ask for them to join in U.S. economic sanctions against Iran to try to force the release of the American hostages held in Tehran.

Much of Europe's trade with Iran has already been disrupted by the Islamic revolution there, but British and West German banks still hold large deposits of Iranian money and still hope to collect on sizable loans to Iran. British and West German officials are reluctant, and not certain they have the legal power, to impose sanctions on this banking activity, as has been done in the United States, without a formal Untied Nations Security Council sanctions vote against Iran. A move in the council to impose sanctions was vetoed Sunday by the Soviet Union.