The conclusion of a transit agreement between Iran and the Soviet Union offers Moscow new opportunities for gradually increasing its influence in Iran, but there is no sign yet that it will significantly affect the Persian Gulf war between Iran and Iraq, according to State Department and Pentagon analysts here.

Potentially more important for Iran's internal situation in the short term are an investigation ordered by Ayatollah Ruhollah Khomeini into reports of torture under the Islamic regime and signs of new trouble in western Iran between autonomy-seeking Kurds and Revolutionary Guards.

Some Western diplomats in Tehran reportedly have expressed concern that the transit agreement and a series of other contacts and accords between Tehran and Moscow may signal an Iranian drift toward greater dependence on the Soviet Union. This concern is shared by some administration officials, who fear that Moscow may be trying to lure Iran into a closer relationship through a greater share of trade and commercial ties.

However, Iranian officials in Tehran have been quoted as denying that their government is deviating from its nonaligned stand based on Khomeini's foreign policy dictum, "Neither East nor West."

The transit accord, formally renewed by Iran's parliament Sunday, officially gives Iran and the Soviet Union transportation rights on each other's territory. It could boost trade currently hampered by the Persian Gulf war, but probably not by much, analysts said.

Iran already had been receiving foreign goods shipped through the Soviet Union despite the lack of a formal agreement. The two countries long have had a renewable transit accord, but it became a subject of dispute after Iran's revolution when the Tehran government cut off deliveries of gas to the Soviet Union through a pipeline from southern Iran.

The Soviets insisted that renewal of the transit agreement be linked to a new accord on Iranian gas exports, and Moscow became sticky about traffic through its territory to and from Iran. However, there was no indication of any such linkage to a gas accord when the transit agreement was announced, although oil and gas purchases reportedly were discussed at a Dec. 2 meeting in Tehran between the Soviet ambassador and Iranian Central Bank Governor Ali Reza Nobari.

It appears doubtful that any new gas agreement can be implemented now because Iran currently produces barely enough for its own needs, and parts of the pipeline in the embattled Khuzestan Province probably need repair.

Nevertheless, "a growing series of contacts on a wide range of subjects" between Iran and the Soviet Union gives the Soviets opportunities for greater involvement in Iran, a State Department analyst said. Other areas of Soviet cooperation with Iran include a steel mill near Isfahan, one of the few projects still employing a large number of foreign technicians, and a recently agreed agricultural scheme near Yazd.

Another development being watched with interest by analysts here is Khomeini's order for an inquiry on torture in postrevolutionary Iran and its potential impact on the domestic political scene.

Iran's official Pars News Agency said the prosecutor general announced the probe after a meeting with Khomeini, who was described as shocked and upset by reports of continuing torture in Iranian prisons. The practice was one of the main grievances of revolutionaries who overthrew the government of the last shah Mohammad Reza Pahlavi.

The emotionally charged issue was raised by President Abol Hassan Bani-Sadr in a speech late last month.

The charges, vehemently denied by the fundamentalist Islamic Republican Party, implicated Ayatollah Sadegh Khalkhali, who suddenly resigned two days ago as head of an antinarcotics squad.

According to Pars, Khomeini stipulated that a commission of inquiry to be formed in the next couple of days is to belong to "no group or party" and have access to all Iranian prisons.

Meanwhile, Pars reported that a dozen persons were killed and several others wounded in clashes between Revolutionary Guards and members of the outlawed Kurdistan Democratic Party near Mahabad in western Iran yesterday.