A former CIA spymaster and two business associates have been indicted by a federal grand jury in Alexandria on charges that they conspired to sell a $5 million diesel engine assembly line to the Soviet Union in violation of U.S. export laws.

Federal authorities said yesterday that the charges were the result of an undercover sting operation run by the Customs Service through a fictitious Paris-based company with which the three allegedly had been dealing since October.

Paul Sakwa, one of the defendants named in the 11-count indictment, was the Washington-based chief of U.S. spy activity in Vietnam from 1959 to 1961. For two years prior to that he worked as a covert agent in Brussels, according to court papers. He left the Central Intelligence Agency in 1962 to join the State Department and remained there for two years before leaving the government to become a consultant.

Also charged by the grand jury were a Chicago business executive, Stephen G. Carter, president of Performance Sales and Marketing, Inc., and Gerald F. McCall, a Toronto businessman.

Sakwa was arrested by Customs agents on Dec. 28 at the Holiday Inn in Alexandria's Old Town section as he waited to meet with Carter and McCall, officials said yesterday. The latter two were arrested the same day at National Airport as they stepped off an American Airlines flight from Chicago.

All three men are free on bond and are scheduled to be arraigned on Monday at Alexandria's federal courthouse.

Customs Service Commissioner William von Rabb told a news conference that the three had an option to buy a diesel assembly line manufactured by Ingersoll-Rand Co., a New Jersey-based conglomerate, and planned to export the assembly line to the Kama River Truck Complex, a major Soviet factory in Siberia.

Ever since U.S. officials found that the truck facility manufactured much of the military equipment used by Soviet forces in its two-year-old operation in Afghanistan, American firms have been forbidden to ship equipment there.

Von Rabb said the United States has no evidence that the Soviet Union was directly involved.

"The Soviets do not leave fingerprints," he said. "So it's not surprising at this point not to have any hard evidence that the Soviets were involved."

The indictment was vague about whether any Soviet officials had been involved. William Rudman, special agent in charge of Customs' Washington field office, declined to say if any Soviet Embassy personnel may have figured in the proposed deal. Rudman said that the Customs investigation is continuing and the question was "sensitive."

The assembly line is among the items on the Commerce Department's Commodity Control List, meaning that a special license is required from the department in order to export it. A license for shipment to the Soviet Union would not be issued, the indictment said.

The grand jury charged that the three men had dealt with the Paris firm, identified only as Arinfi, in order to obtain documents listing France as the final destination for the equipment. Assistant U.S. Attorney Joseph J. Aronica said that the name Arinfi carried no special significance.

The indictment, returned late Tuesday in Alexandria and made public yesterday, alleged that the men had been alerted on Dec. 20 through an acquaintance of Carter's that the Soviets were interested in buying the assembly line.

The Customs investigation is part of Operation Exodus, a 14-month-old Reagan administration campaign to curb the illegal export of American-made high-technology and strategic materials. A Canadian firm and two of its executives are facing similar U.S. charges in Alexandria alleging that they conspired to ship tank engines to Iran.

Sakwa, a Northwest Washington resident, made headlines in 1973 when he opposed President Nixon's choice of William E. Colby to head the CIA, criticizing Colby's performance as CIA station chief in Saigon in the early 1960s.

Sakwa, who watched over the agency's covert activities in Vietnam for about two years, later served as special assistant to CIA spy chief Richard M. Bissell Jr. before leaving the agency.

If convicted, Sakwa and Carter face up to 50 years in prison and fines totaling more than $75 million, under provisions of the Export Administration Act. McCall could receive a maximum penalty of 45 years' imprisonment and more than $50 million in fines.