More than five years after painfully detailed negotiations began in Tokyo, the United States and 22 other nations initialed yesterday in Geneva a comprehensive agreement designed to liberalize world trade over the next decrade.

For the first time, this round of trade negotiations-the seventh since the end of World War II-deals with artificial, deliberate government impediments to trade known as "nontariff barriers."

To stem the tide of protectionism, the new agreement sets up codes of behavior to spell out acceptable practices for and limits to such nontariff trade barriers as subsidies, licensing procedures and other gimmicks designed to interfere with the free flow of goods.

In addition, the agreement includes tariff cuts averaging about 33 percent, on $140 billion of annual world trade, spread over an eight-year perios beginning in 1980 (except for steel and textiles, where cuts do not begin until 1982). This is a shade below original hopes for about a 40 percent average tariff cut.

President Carter praised the multilateral trade negotiations as "the most comprehensive and far-reaching" since world trading rules were codified by the General Agreement on Tariffs and Trade (GATT) in 1947.

And in a euphoric send-off, special trade representative Robert S. Strauss, whose office did the tough negotiating with a total of 98 other nations, said the results were "remarkable" in light of the fact that the talks had come to a virtual standstill two years ago.

The agreement now enters a ratification process, the most crucial element of which will be approval by the U.S. Congress, where free-trade opponents are girding for a round-the-clock battle.

Formal congressional approval of tariff reductions is not required, but the nontariff agreements must go through both houses of Congress. The rules spelled out in the Trade Act of 1974 bar amendment or parliamentary maneuvers to block consideration. That means that Congress must vote the trade agreements up or down, within a 90-day legislative period, once the president sends the agreements to Capitol Hill, probably early next month. A final decision is anticipated by fall.

Other nations have made it clear that their final approval is predicated on congressional acceptance of the agreements.

One disappointment yesterday was that Argentina was the only one of the developing nations to put its name to the full agreement. But the United States signed separate bilateral agreements with 18 other less developed countries, covering some tariff and some nontariff barrier understandings. Eventually, U.S. officials said, some of these 18 are likely to adopt more of the total package.

Spokesmen for poor nations said in Geneva that the agreement would yield them unsatisfactory results. They complained, as well, that the rich nations had ignored their proposals for expanding trade. There were indications that some of the poor naions would wait until after the United Nations Conference on Trade and Developement (UNCTAD) in Manila next month before signing.

As of late last night, according to trade officials here, the 23 countries initialing the full pact were the United States, Japan, Argentina, Hungary, Sweden, Switzerland, Australia, Canada, Norway, Finland, New Zealand, Austria, Bulgaria, Czechoslovakia, and the nine members of the Common Market. Altogether, 99 nations participated in the negotiations in Geneva.

Officials hesitated to give precise figures on the potential economic impact in the United States. They claimed only that the tariff reductions and the lowered nontariff barriers, when fully effective, should be worth several billion in added exports annually to the United States.

The United States has agreed to cut its import duties from an average of 8.3 percent to 5.7 percent on a trade-weighted basis. On balance, the United States and Europe exchanged about equal percentage reductions, while Japan is making steeper reductions that put U.S. and Japanese levies about on par for the first time.

Officials said that American agriculture would benefit significantly from new export opportunities for meat, tobacco, vegetables, wine, oilseed and nuts.

Deputy special trade representative Alan Wolff said that in U.S. regional terms, there were virtually "all winners, no losers." He said that these states or area would have the following enhanced export opportunities:

Northeast-scientific and hospital equipment, data processing equipment, fish; upper New York state-photographic equipment and film.

Middle Atlantic-chemicals and plastics.

Midwest-machinery, soybeans, paper, beef and pork.

South-poultry, lumber, machinery, paper, tobacco, rice, and citrus fruit.

Southwest-drilling equipment and chemicals.

West Coast-citrus fruit, specialty crops, computers.

Pacific Northwest-specialty crops, aircraft, beef and lumber.

In Geneva, European Economic Community chief negotiator Sir Roy Denman said the Common Market had gained new access to U.S. and Japanese markets, citing especially opportunities to sell cheese here. In Japan, a spokesman for the government hailed the agreement and said it would work for the settlement of outstanding issues.

If approved by Congress the agreement initialed at Geneva will go a long way toward meeting the U.S. objective of making the existing set of trading rules more open, more fair, and less discriminatory.

As Wolff pointed out at a news conference yesterday, the Tokyo round has been negotiated and now completed against a background of sluggish growth and high unemployment that normally feeds the trend toward protectionism.

But there are some negative aspects to be considered. First of all, two crucial codes sought by the United States have not been completed.One would set up international rules for "safeguards," or temporary relief measures, against a flood of imports.

As it stands, countries can still act unilaterally to choke off what they consider excessive imports, especially from less developed countries. So far, the Common Market countries have insisted on the right to take such actions.

In addition, an attempt to develop an international code that will give manufacturers relief when other counterfeit their goods-faking the name-brand-is yet to be completed.

Wolff said that he still hopes that a "safeguards" and "counterfeiting" code will be completed in the next few weeks. When the counterfeiting code is finished, Wolff said, it will require destruction of fake goods, such as widely counterfeited Levi Strauss jeans.

Another area of disappointment to the United States is that an agreement to remove all duties on civil aircraft, in an effort to develop a global market, was not signed by Austria, Finland, and Norway. But it was signed by the United States, Canada, Japan, Sweden, and the Common Market countries.

Yet another gap in a totally freetrade approach resulted from advance concessions to labor-intensive U.S. industries such as footwear. Thus, under the new customs evaluation code, the United States abandons the notorious American selling price system under which some chemicals, Footwear, and other products got special protection.

But coincident with the demise of that system, new tariff schedules will be put into effect for the old American selling price-list of commodities. Even the official government fact sheets admit that the new customs evaluation code "will not seriously impact U.S. producers footwear, or distilled spirits."

A cautionary note was also sounded by the American Importers Association, which claimed that "many concessions have been made to protectionist interests." In particular the association said that the way the treaty is drafted, foreigns seeking to argue against any Treasury moves for countervailing duties would not be given sufficient time to make their case.

On the whole, American negotiatiors said that the five codes that were adopted/on subsidies, government procurement, standards, licensing, and customs valuation-will mark the beginning of a new era of international conduct. These problems had never been addressed before the Tokyo round.

Wolff singled out the code on government procurement "as the biggest single new opportunity" for American exporters. It provides that government procurement among all of the signatories will be opened to competitive bidding.

Wolff said that this could allow U.S. companies to bid on as much as $20 billion a year in foreign government purchasing, now shut off by various buy-national policies.

One exception: Because Japan's offer to open up its government procurement did not include sophisticated telecommunications equipment for Nippon Telephone and Telegraph, the United States is not opening up any of its government buying to Japan.