The United States yesterday ended talks with its Western European allies over export farm subsidies in an atmosphere of cordiality far removed from the threats of an agricultural trade war that marked their beginning. But there was no indication that five rounds of talks here and in Europe had narrowed the substantive differences between them.

U.S. and European officials agreed, however, to set up a permanent working group to try to reach common understanding on the subsidy codes of the General Agreement on Tariffs and Trade (GATT), a point of contention between the United States and the European Economic Community.

Despite the words of good will at briefings held here by both Americans and Europeans, U.S. officials said they have not given up the option of future subsidized sales to capture markets they believe have been unfairly taken over by EEC members through their own subsidies.

Earlier this year, the United States angered Europeans by selling 1 million tons of subsidized wheat flour to Egypt--considered a traditional European market--in a move that some American officials described as "getting the Europeans' attention" to the seriousness of Washington's complaints.

One EEC official suggested the United States might follow up on the wheat-flour deal with the sale of surplus dairy products to Egypt.

Despite European suspicions, though, there were increased signs of good will from both sides in dealing with an issue that both affects world trade in farm products and holds extreme political sensitivity for the United States and the 10 European nations that make up the Common Market, as the EEC is generally known.

The European's Common Agriculture Policy (CAP) is considered the glue that holds the Common Market together. U.S. farmers, on the other hand, are using their political muscle to insist on Capitol Hill and in the White House that subsidies to European farmers make it impossible for them to compete for agriculture sales in third countries, such as the Mideast.

"The issues that are before us are very fundamental to both sides," said Deputy U.S. Trade Representative Michael B. Smith.

"The problems have not been resolved," he continued. "We continue to feel very strongly that there are major differences in our agricultural trade relations with a number of countries, including the community. We want to get rid of those problems. We want the freest possible trade in agriculture and we want the opportunity to compete in agriculture."

George Vest, the U.S. ambassador to the EEC, said he detected "a really genuinely more serious search" for a solution as the meetings progressed from their start in January under the threat of a trade war.

"We're encouraged by the fact that each time we come to the next step of cooperation," said Helmut von Verschuer, the EEC's deputy director general for agriculture.

"The perceptions and climate are totally different now than what they were before the GATT ministerial meeting in November," he continued at a briefing for reporters.

Just before the GATT meeting, Agriculture Secretary John R. Block warned that the United States might dump $3 billion in surplus dairy products on the world market if the Europeans didn't back off from subsidized exports, which he said were robbing U.S. farmers of their markets.

That kind of language has disappeared from the talks in recent months and the EEC's representative in Washington, Sir Roy Denman, said yesterday he hopes the U.S. government "will continue to avoid returning to obviously counterproductive tension."

"We hope the behavior of our partners will contribute to avoiding tensions," added von Verschuer.

One added element as the U.S.-EEC agricultural talks progressed was the realization among some American officials that the loss of poultry markets in the Middle East was due to a third player in the game, Brazil, as well as the Europeans.

As a result, Brazil attended yesterday's talks in an attempt by EEC and U.S. representatives to persuade it to end what they charge is its illegal export subsidies for chickens. Smith, the deputy U.S. trade representative, emphasized that the United States believes that European-subsidized poultry exports also hurt U.S. farmers.

Smith said there were no signs that Brazil was persuaded to end its subsidies to poultry farmers for overseas sales.