Former CIA agent Frank Terpil and a one-time business associate were indicted by a federal grand jury here today on charges of conspiring in 1979 to deliver guns, decoding devices and instruments of torture to Idi Amin, who then was dictator of Uganda.

The six-count indictment alleges that Terpil and George Gregory Korkala illegally delivered to the U.N. mission of the former Ugandan government quantities of semi-automatic shotguns, handguns, silencers, high-velocity, hollow-point magnum ammunition, voice encipherment systems and torture items known as "Exercise Twisters."

The indictment further charges that Terpil and Korkala delivered lead-lined X-ray-proof packing sheets to the mission's staff to facilitate the air shipment of the weapons under diplomatic seal or in commercial Ugandan aircraft to Uganda.

The indictment says that Terpil formerly controlled the Oceanic International Corp. of Washington, D.C., and that Korkala controlled the operations of Amstech International Ltd. of Nutley, N.J.

Korkala is additionally charged with three counts of engaging in the sale of firearms without a federal dealer's license and transporting the weapons in foreign commerce.

The two defendants and Terpil's wife, Marilyn, are charged in a separate conspiracy to secure false passports and foreign travel documents for Amir Farhang Momtaz, a senior official in the former royal government of the shah of Iran.

The indictment charges that for a $5,000 payment the defendants altered the photo on a legitimate U.S. passport, provided a false Lebanese passport, and that Marilyn Terpil accompanied Momtaz to the passport agency in New York where she posed as his daughter and assisted him in submitting a false birth certificate and driver's license in order to secure a valid U.S. passport.

The two conspiracy counts and the substantive passport fraud count with which Marilyn Terpil is charged all carry maximum terms of five years with fines up to $10,000.

The three separate counts in which Korkala is charged carry a five-year prison term for conviction of each count.

On May 16, 1981, Terpil and Korkala were convicted in absentia in New York of selling arms to two undercover agents posing as terrorists. They were sentenced to 17 to 53 years in prison. All three defendants are fugitives.

Terpil and Korkala are both believed to be living in Beirut.