The United States and Japan yesterday agreed on the broad framework of a settlement of U.S. complaints of Japanese unfair trade practices in semiconductor sales, the most contentious trade irritant between the two countries, officials of the two governments said.

The agreement would assure U.S. semiconductor manufacturers of increased access to Japan and set up a system of monitoring prices that would keep Japanese companies from dumping chips in this country at less than their fair market value, according to government and industry sources.

The announcement was made in Tokyo after U.S. Trade Representative Clayton Yeutter and Minister of International Trade and Industry Michio Watanabe met for more than 13 hours yesterday. The talks lasted from early morning to just before midnight, MITI spokesman Hiroshi Sugiyama said.

U.S. trade officials here, who talked to Yeutter, described the agreement as "a framework" and said that "hard negotiations" remain to fill in the details. The officials said they hope the agreement, one of the most important reached between the United States and Japan since it affects the future of industries on the cutting edge of technology, will be ready to be signed by the end of June.

The key point would assure U.S. companies of an enlarged share of the Japanese markets. Although Reagan administration sources insisted that no formal statement of market share will be in the agreement, it will contain language that will guarantee U.S. companies a specific share.

Japanese sources were quoted by the French news agency Agence France-Presse as saying the U.S. share would rise from 10 percent to 20 percent over the next five years. Sources here, however, placed the target slightly lower, at 18 percent. The industry was asking for a 30 percent market share, but was reported to have backed off that demand.

The share will be for the total market in Japan, including semiconductors used by automobile manufacturers and the appliances industry, which have been considered the most resistant to breaking up their traditional system of Japanese suppliers to buy imported products.

The agreement could lead to the suspension of the unfair trade complaints, which have been brought by the Reagan administration and domestic semiconductor manufacturers. These complaints accused Japanese companies of working within a government-sanctioned cartel to limit sales of American-made chips in Japan while engaging in predatory pricing at below the fair market value to gain a major portion of the U.S. market.

Japanese companies face penalty duties in one complaint, charging them with dumping 64K dynamic random access memory (DRAM) chips -- which have been surpassed by a new generation of semiconductors that can store far more information -- at prices as much as 35 percent below their fair market value. The International Trade Commission ruled Tuesday that the Japanese dumping caused substantial economic injury to the U.S. industry.

Still pending are two other dumping cases affecting new generation chips, the 256K DRAM and the 256K erasable programmable read memories (EPROM).