BRUSSELS, AUG. 5 -- European Economic Community governments today agreed to cut subsidies of pasta exports to the United States, averting a trade war over a tiny but highly visible portion of trans-Atlantic trade.

U.S. Trade Representative Clayton K. Yeutter welcomed the agreement but said, "It should not be necessary to go to the brink of a trade war every time we have a trade dispute."

The accord ends almost seven months of negotiations over European pasta exports to the United States that totaled $28 million last year, a fraction of 1 percent of the EC's shipments to the United States.

Diplomatic sources said the agreement was given unanimous approval by the member states' envoys to the community, and ratification by the capitals is virtually assured.

The deal reached by Yeutter and Willy De Clercq, EC commissioner for external relations, calls for a reduction of the subsidies by 27.5 percent.

Negotiators also agreed that 50 percent of European pasta exported to the United States will be made of nonsubsidized wheat.

In a statement from Washington, Yeutter called the agreement a compromise and said the United States would continue to seek lower pasta subsidies as part of broader discussions on the General Agreement on Tarifffs and Trade (GATT).

The United States and the EC agreed to monitor compliance with the accord at three-month intervals through September 1988. Thereafter, the reviews would be carried out every six months.

Pasta export refunds, the text said, will be adjusted periodically to assure the 50 percent level is "maintained as accurately as possible."

Diplomatic sources said the accord was reached largely through pressure from the member governments.

Sources said the EC executive commission, which negotiated the deal, was sharply split on the issue between De Clercq, who wanted the dispute ended, and president of the 17-member executive body, Jacques Delors, who thought it conceded too much ground to Washington.

To satisfy Delors, the former French finance minister, the ambassadors approved a statement saying the accord "should not be seen as setting a precedent" for future trade accords, according to a diplomat who spoke on condition of anonymity