MOSCOW, APRIL 6 -- Soviet leader Mikhail Gorbachev flew unexpectedly to Tashkent in Soviet Central Asia today to meet with Afghan communist party chief Najibullah amid speculation that terms of an agreement to withdraw the 115,000 Soviet troops from Afghanistan have been concluded.

Gorbachev's sudden trip follows a prolonged visit to Kabul by Soviet Foreign Minister Eduard Shevardnadze in which he apparently worked out the final details of an agreement to end Soviet involvement in the eight-year-old Afghan war.

Shevardnadze also arrived today in Tashkent, located 200 miles from the Afghan border, to take part in the talks between the two leaders, the official Soviet news agency Tass reported.

There were no details available here about the terms of the discussions between Gorbachev and Najibullah. But a senior Soviet official in Moscow said today that Kabul now agrees that a Soviet troop pullout is possible even if the United Nations-mediated talks in Geneva between Afghanistan and Pakistan fail to reach a successful conclusion.

Asked at a press conference whether the Afghan government would concur on a troop pullout even if the talks fail, Deputy Foreign Minister Vladimir Petrovsky said, "I can say in this connection that our position has been fully discussed and is in full accord with that of the Afghan government." He added that "our positions have been agreed upon."

The talks in Geneva to negotiate an end to Soviet involvement in the war have been bogged down in recent weeks over an American demand that there must be "symmetry" in the cessation of U.S. military aid to the mujaheddin, the Afghan resistance, and Soviet aid to the Kabul government.

The United States and the Soviet Union serve as observers to the Afghan peace talks being mediated by U.N. envoy Diego Cordovez. The talks are being conducted by Afghan and Pakistani negotiators.

The Soviets have rejected publicly the American demand, arguing that Moscow has a longstanding agreement to supply aid to Afghanistan that predates the war. The Reagan administration has said that it would not be willing to be a guarantor of a Geneva agreement unless both the Afghan resistance and Kabul government have the same right to receive future military aid.

{White House spokesman Marlin Fitzwater said Wednesday the Soviets have not provided "a definitive response" to the new U.S. proposal late last week for redefining the issue of "balanced" cutoffs of U.S. and Soviet military assistance to the Afghan resistance and the Kabul government.

{Administration officials said they believe that Shevardnadze went into the talks with Najibullah seeking a way to preserve and complete the Geneva process under a withdrawal-and-military-aid plan acceptable both to the United States and the Kabul regime, Washington Post staff writer Don Oberdorfer reported. The officials said they had no direct reports of the results of Shevardnadze's meetings in Kabul or of Gorbachev's meeting with Najibullah in Tashkent.}

As Gorbachev, Najibullah and Shevardnadze met in Tashkent, Soviet officials in Moscow indicated that Afghanistan and the Soviet Union are prepared to make a bilateral announcement of troop withdrawal.

When Shevardnadze flew to Kabul Sunday, he told the official Soviet news agency Tass that his visit in the Afghan capital was to explore the options if the negotiations in Geneva proved unsuccessful.

The terms of the final decision reached by Shevardnadze, including whether the United States will be a guarantor of the agreement, are unclear.

According to signals emerging in Moscow, the Soviet withdrawal could be unilateral, arranged outside of the Geneva process.

In a March 31 interview released by Tass, Shevardnadze talked about the terms of a Soviet withdrawal without an agreement in Geneva "but on the basis of a separate agreement which we shall work out in this case with Afghanistan . . . in a way convenient for the government of Afghanistan and ourselves."

He went on to say that this outcome would not be "something unexpected," although he continued to express Moscow's preference for seeing the Geneva talks end successfully.

Shevardnadze first signaled Moscow's plan to end Soviet involvement in the Afghan war this year when he was quoted during a visit to Kabul in January as saying that he hoped 1988 would be the last year of Soviet troop presence there.

Gorbachev, in a Feb. 8 statement, said Moscow planned to withdraw its troops May 15, or two months after agreement was reached in Geneva.

In recent weeks, the Soviet leadership has expressed bewilderment over new preconditions for a Soviet troop pullout that have been raised by Pakistan and the United States.

At the same time, Soviet officials have made clear that Moscow is so strongly committed to a withdrawal that it would contemplate making the move without Pakistani or U.S. approval.

The fact that Shevardnadze spent three days in Kabul working on the details of an accord suggests that the negotiations were probably intensive and that the Afghan government may have at first objected to a unilateral Soviet withdrawal. Moscow radio reported that the Afghan leader arrived in Tashkent today with Shevardnadze.