When the Soviet Union sought American computers to help run its huge new Kama River truck factory 10 years ago, a budding spirit of detente carried the deal through despite misgivings that Kamaz trucks and engines would eventually bolster Soviet armed might.

Now, according to reliable reports, Kamaz trucks help supply Soivet troops in Afghanistan, and the diesel engines from the vast plant in remote Tartario power some Soviet armored vehicles, rated among the world's best.

In retaliation for the invasion of Afghanistan, President Carter at first ordered a flat embargo on all U.S. technology to the Soviet Union, including an advanced plant to make oil-drill bits and computer spare parts for the Kama factory. The move should have relatively quick impact on the complex truck assembly lines since the Soviets usually skimp on orders for spare parts.

Meanwhile, Carter has approved the sale of a $5 million offshore oil rig to the Soviets, justifying the sale on grounds the West must aid Soviet oil production to keep Moscow from becoming a net oil importer, which would drive world prices higher.

This ambiguity is one example of the relations that have grown during the last decade as Moscow moved to seek Western technology to modernize its economy. This "technology transfer" stands near the center of the debate on the future of East-West detente in the 1980s.

It is also a debate with great impact here among the managers of a troubled and stagnant economy and the politicians who must shape decision for the Soviet Union i n the 1980s.

In an economy as vast as the Soviet Union's, the actual amount of high technology imported in the past decade amounts to very little. For example of the $600 million in the U.S. manufactured goods shipped to the Soviet Union last year, only about a third could be classified as high technology. The Soviets would have liked more, but the United States balked because of concerns about diversions of its highly prized computer expertise into Soviet military programs.

In February, the Communist Party newspaper Pravda said the Western sanctions would have little effect on the national economy since imports from the capitalist countries totaled only 1.5 percent of the country's gross national product. Pravda disregarded the fact that despite the relatively small amount of this trade, the Soviets have concentrated their purchases on computers and process controls that their own sluggish civilian economy cannot manufacture.

It is cheaper and quicker for Moscow to import these items and thus avoid attempting to divert its own secret military economy into providing advanced technology to the civilian sector. This is especially true since in most cased the defense establishment has achieved its breakthroughs only after concentrating enormous resources. Thus, the real value to the Soviets of importing computers cannot be measured in straight dollar terms.

A Western study three years ago concluded that much of the Soviet Bloc's second and third generation computer technology probably was imported from the West. In 1979 alone, the United States exempted 600 items previously banned for export to the Soviets by the allied trade group known as CoCom as being of possible military importance to Moscow. Of these 600 about 300 deals were for computers and other technology.

The Carter administration has said it will pay much closer attention to the CoCom lists. Meanwhile, the U.S. ban on high-level electronics also embraces components used by virtually every other Western computer firm. This move, plus pledges by allies such as West German Chancellor Helmut Schmidt not to fill the U.S. gaps with West Germany products, may go far to plugging chronic seepage of the past when foreign firms rushed to fill orders to U.S. banned out of political or military reasons.

However, the Soviets are wasting no time taking steps of their own to blunt the impact of U.S. sanctions. Recent West European press reports indicate Soviet trade teams are offering lucrative new deals to French, West German and Italian firms, especially for computers and semiconductors. The Soviets reportedly are playing on Western European unemployment, the Europeans' desire to promote detente and the promise of long-term, follow-up contract. Over the years, U.S. companies and their Western European affiliates have gained great experience in arranging deals through third parties and covering the records of complex transactions.

When Carter ordered the embargo last January, about 800 export deals of all kinds were frozen. Since then, the ban has been modified to apply only to items that could raise the technical level of Soviet production -- such as the Kamaz computer system. Other sophisticated items, such as advanced pumps for so-called secondary oil and natural gas recovery, have been cleared for export, as well as some spare parts contracts already in the works at the time of the president's order.

Soviet oil and gas recovery technology is about 25 years behind America's. Despite strong sales pitches from French and West Germans in this field and the embargo effects, U.S. businessmen here believe they can do a brisk trade in this machinery. As one said, "The Soviets need the best and know it, and only the U.S. can give it to them."

Because of deep concern over possible falloff of Soviet oil production, the only likely exception to the ban may be the $144 million Dresser Industries drill bit manufacturing plant. Informed sources here say many of its major components were already en route when the embargo was ordered.They suggest the plant eventually will be built, in contrast to the seemingly permanent stop to a massive steel production facility sponsored in part by Armco Corp. which the Soviets hoped to have on line in the mid-1980s.

Moscow's need for these machines and components have never been greater.Economic expansion, sluggish throughout the 1970s, faces severe energy and manpower squeezes in this decade. The U.S. sanctions hit at the crucial time when the State Planning Committee is drawing up economic plans for 1981 through 1985.

"Our country moves in five-year segments," one knowledgeable Soviet source commented, "and the need to pin down contracts and reliable suppliers in the West is at hand."

Little is known of the shape of these discussions, which center in the upper reaches of the Council of Ministers headed by Premier Alexei Kosygin, 76, and the 300-member party Central Committee.

"Each special group is competing hard for its own programs," a Soviet source said. "The discussions are fierce, for in our system, once the decisions are made it is very hard to change them and no one wants to have his own program left out."

Some plant managers reportedly have said they expect the new plan to substantially enlarge the purchase and use of process control instruments from the West as one way of improving lagging productivity. But this is not certain, and it will not be before late summer that the first solid clues to the next five-year plan emerge. It is even unclear so far whether the plan will be presented at a party congress next spring, or perhaps, late this year. The Congress is likely to be the last of the Brezhnev era.

Technology has always been a jealously guarded commodity here. On one side stand suspicious civilian bureaucrats and party functionaries who, fearing challenge to their authority, deploy far-reaching arguments to defeat the technical revolution.Last year, for example, the minister of the key Soviet machine-tool industry complained in Izvestia, the government newspaper, that a 12-year old decree of the State Standards Committee ruled out the use of computers to help design complex new machine tools "because the type face used by computers does not conform to the state standard and the distance between printed lines differs from the standard by two or three millimeters."

On the other side stands the military, which commands economic resources to make some of the world's most formidable missiles, tanks, helicopters, ships and telecommunications equipment. But unlike Western defense complexes, the Soviets yield almost none of these hard-won scientific advances to civilian industries.

Innovation has languished in this secrecy-ridden atmosphere. The Soviet computer lag behind the United States has steadily widened to a solid decade or more today by most informed Western estimates.

While Soviets import mountains of Western technical literature, the impulse for control and secrecy means only top-secret institutes see it quickly and it may be years before it is circulated to interested design or theoretical bureaus. Censorship delays, Soviet sources say, can cause wasteful parallel work on the same problem to proceed undiscovered for years. Photocopiers, essential for quick dissemination of complex designs or formulas, are under tight state control out of fear they could be used for political reasons. A 1977 survey of 300 design offices here show that in 250, technical drawings were being handcopied in pen and ink.

However, most Western analysts consider the quality of Soviet theoretical work equal to or better than comparable U.S. and Western efforts in a number of areas. The hitch comes when the Soviets try to convert this knowledge into hardware.

Under the exaggerated secrecy imbedded in Soviet life, work which in the West would find quick industrial application frequently is never finished here. Elsewhere, the gap between research and end product seems to be widening as separate ministries go their own ways without coordinating research with others.

A senior Soviet economist in November reported with dismay that since 1960, the number of new kinds of industrial machines has declined from an average of 4,700 introduced in 1961 to 3,600 in 1978. "Moreover, the technical level of the new articles leaves something to be desired," wrote L. S. Glyazer in a major management journal.

"Of the 1976 models, only 20 percent were better than equipment already in production in the U.S.S.R. or elsewhere, while 60 percent were on a par with existing models." He did not bother to mention that the remaining 20 percent were substandard.

"We see more instances of dislocation between fundamental and applied science," he concluded. "It is urgently necessary to create a centralized organization to manage research activity. But ambitious plans announced in 1971 to computerize the entire Soviet production and research base through vast regional data centers have faded and no longer are mentioned anywhere in a serious way.

Meanwhile, as Soviet trade missions scramble and deal for new Western technology sources in the aftermath of the U.S. sanctions, the party and planners confront a new decade filled only with immense strain and challenge for the Soviets.

A Soviet source said of all this worry and anxiety: "There has never been more uncertainty at the high levels since the end of World War II."