China has agreed for the first time to sell oil directly to an American company, the latest move by Peking to open its economy to the west and aggressively develop its still unmeasured oil reserves.

The agreement, between Coastal States Trading Co., a Texas-based independent oil company and the Chinese government, was completed in Peking last week and will bring 3.6 million barrels of Chinese oil to the U.S. market next year.

While the volume of oil is small, amounting to five standard oil tanker loads or about half of one day's U.S. imports, the China oil sale is being read by American oil companies and Carter administration officials as an encouraging sign that Peking remains anxious to negotiate offshore oil concessions with major oil companies.

In the past, Chinese oil has been offered for sale to the majors, including Gulf Oil Corp., through intermediaries, but no known direct sales have taken place.

Coastal States vice president Robert Wells said that negotiations lasted about two weeks. "If everything works out satisfactorily we'll buy more," Wells said.

He declined to say how much his company would pay for the oil. Stanley Young, of the National Council on U.S.-China Trade, said recently the Chinese have sold their oil at "a very small discount" off the world price.

Industry sources estimated the value of the deal at $45 million.

One irony is that the oil, from China's Taiching field, which Coastal States plans to process at its Hercules, Calif., refinery, will be coming into a market glutted because of the West Coast surplus created by new production from Alaska's North Slope.

At the State Department, Deputy Assistant Secretary of State Steve Bosworth said China has made small sales to other countries in the past. But he said China is still not a major oil exporter.

Up until a few months ago, the Central Intelligence Agency had estimated that China's exports could run to nearly 300,000 barrels of oil a day between now and 1982, and a half million barrels by 1985.

Following his October visit to China, however, Energy Secretary James R. Schlesinger revised upward the government's estimates of oil that could be recovered in China, saying it could amount to 100 billion barrels, or a little less than three times U.S. reserves.

While in Peking, Schlesinger was told by Chinese officials that they planned to raise their oil production to 4 million to 6 million barrels of oil a day by 1985, which is as much as produced by Iran, the oil cartel's second-largest producer.

When asked whether China could meet that goal, Schlesinger answered, "It is not impossible."

Last May, Communist Party Chairman Hua Kuo-feng said that Peking would develop the equivalent of 10 oil fields the size of Taiching, China's largest, by the 1990s.

China expects to use the hard currency it earns from oil sales to underwrite its economic development and to buy advanced weapons from the west.