The United States and Japan have agreed to open Japan's markets and its government-sponsored research to American companies in the increasingly important field of high technology, Commerce Secretary Malcolm Baldrige said yesterday.

The agreement, approved by the Japanese and U.S. cabinets, attacks what many experts consider an area of world trade where American dominance is being threatened by policies of the Japanese government, which selected high technology as an industry for special support. The agreement does not have the force of a treaty, however, and requires voluntary compliance by both governments.

Letters endorsing the agreement were exchanged Friday morning in Tokyo by Japanese Foreign Minister Shintaro Abe and U.S. Trade Representative William E. Brock, who is meeting with senior Japanese officials on pressing trade issues.

The agreement places the two governments in favor of ensuring full mutual access to trade and investment opportunities in high-technology industries and to cut down bars to free trade in the high-tech area.

One high Commerce Department official, Undersecretary Lionel H. Olmer, estimated in November that Japanese high technology--riding on the back of government targeting--is becoming so sophisticated that America's defense industry is likely to become dependent on it by 1990.

"Access to Japanese technology on a fair and competitive basis, as they have access to ours, will help U.S. industry improve productivity and balance the flow of technology between our two countries," Baldrige said.

"The advancement of our high-technology industries is a step toward restoring world economic growth, which requires the urgent attention of both our governments. With today's agreement, I believe we have the tools to begin work on this most important task," the U.S. Commerce secretary continued.

Acting Assistant Commerce Secretary Clyde V. Prestowitz, who has been negotiating with the Japanese on problems in high technology since May, said the agreement could "have a major impact" in giving American high-tech companies greater opportunities to sell their products in Japan.

Moreover, he added, the agreement opens "information windows" into high-tech research in both countries. Prestowitz said this is more important for American companies, who find it hard to learn what Japanese researchers are up to, than for the Japanese, who have easy access to U.S. research.

Baldrige said this is especially true in the areas of super computers, fiber optics and advanced semiconductors, which the Japanese government has selected for special attention.

One provision of the agreement is aimed at opening up NTT, the Japanese telecommunications monopoly, to American-made products by including a pledge by both governments to eliminate specifications that discriminate against foreign goods.

Both countries agreed that they should work to prevent "anticompetitive or predatory practices," which is being interpreted here as a recognition by the Japanese that their program of targeting industries for special government help may create bars to free trade.

Furthermore, the agreement provides that government incentives to Japanese high-tech firms also should be available to foreign companies doing business in Japan. After touring Japanese high-tech industries late last year, Olmer reported that their achievements "could not have been possible without the financial, political and intellectual support of the government, whose influence permeates virtually every sector."

At the present time, Japan sells the United States about $150 million more in semiconductors than it buys from American companies. Prestowitz said U.S. firms complain that their new products sell well in Japan for one year, but then Japanese firms copy it and take over the market. The Japanese said they are able to sell so well because they make a better product, but the Americans argue that the tradition of "buy Japan" prevents them from maintaining their strong sales position.

Prestowitz said the agreement includes provisions for close monitoring of the market "to avoid trade frictions before they arise."