President Reagan plans to announce this morning that the United States and the Soviet Union have reached agreement on the main outline of a treaty banning medium- and shorter-range nuclear missiles and that he and Soviet leader Mikhail Gorbachev have "agreed in principle" to hold a summit here, administration sources said yesterday.

This disclosure followed a day of surprises in which Secretary of State George P. Shultz and Soviet Foreign Minister Eduard Shevardnadze unexpectedly extended their three days of talks, approved and announced a U.S.-Soviet accord to begin new negotiations on nuclear weapons testing and met secretly for 35 minutes at the White House with Reagan.

Several U.S. officials said the flurry of developments was generated by a variety of new arms control concessions presented by the Soviet Union during the first day of negotiations on Tuesday.

Officials said the Soviet concessions included movement toward accepting a U.S. timetable for the withdrawal of American warheads on 72 West German Pershing IA missiles. The Pershing issue, long a major hurdle impeding a treaty eliminating intermediate-range nuclear forces (INF) around the globe, was a key item in the Shultz-Shevardnadze talks.

The Soviet concessions also included a willingness to accept limits on certain categories of strategic nuclear arms, which the Soviets had recently rejected, and a new Soviet approach to limits on weapons in space, the most intractable issue between the two sides, according to the U.S. officials.

A senior official told Washington Post staff writer Lou Cannon that Reagan discussed the prospective summit with Shevardnadze and Shultz during a meeting from 5:50 to 6:25 p.m. at the White House after the president had returned from Constitution bicentennial ceremonies in Philadelphia.

Officials said previously that the Reagan-Gorbachev summit is likely to be held in late November, but they gave no indication last night whether dates would be announced today. U.S. sources said Shultz plans a trip to Moscow in October to work on arms issues and summit details.

Officials said Reagan is expected to appear in the White House briefing room to make the announcement, which would mark a momentous step in an administration that came to power in 1981 brandishing anti-Soviet rhetoric and emphasizing a buildup of U.S. military power. Shevardnadze has scheduled a news conference for 9:30 a.m.

"History is in the making. We must wait a little bit," Soviet Foreign Ministry spokesman Gennadi Gerasimov told surprised reporters as he and Charles E. Redman, his State Department counterpart, disclosed about 2:30 p.m. yesterday that the talks were being extended through Thursday evening. They had been scheduled to end at noon Thursday.

Gerasimov and Redman later appeared side by side in the State Department briefing room to announce the accord on nuclear testing negotiations, which had been thrashed out by a special "working group" in the past day and then endorsed by Shultz and Shevardnadze.

The announcement said the negotiators will start by developing new means of verifying compliance with two still-unratified U.S.-Soviet nuclear-test treaties of 1974 and 1976, in keeping with the Reagan administration's longstanding desires. The "ultimate objective" of the talks was announced to be "the complete cessation of nuclear testing as part of an effective disarmament process," in keeping with a key Soviet goal.

The agreement also stated that Washington and Moscow intend to design and conduct joint experiments at each other's nuclear test sites to improve verification. This may include monitoring of an underground U.S. nuclear detonation on Soviet soil, and of a similar Soviet blast on U.S. territory, as recently proposed by the Soviets.

The revival of nuclear testing negotiations, which the United States and the Soviet Union last conducted during the Carter administration in 1980, was seen by officials as solving an important political problem in both countries. Support for elimination of all but a few nuclear tests each year has been growing steadily in the U.S. Congress, and Gorbachev committed much personal prestige to the issue when he ordered a 1 1/2-year unilateral moratorium on Soviet tests in mid-1985.

The nuclear testing announcement was made yesterday afternoon, a U.S. official suggested, to alleviate speculation and possible worldwide concern that the Shultz-Shevardnadze talks went into overtime because of a serious problem between the two countries.

What made possible the forthcoming announcement on the INF treaty and a summit at which to sign it was a settlement of the contentious issue of Pershing IA warheads.

The Soviet Union had demanded in the current negotiations in Geneva that the United States withdraw the Pershing IA nuclear warheads and all other warheads based in Europe within one year. By late yesterday, however, Shevardnadze was said to have accepted the position that all U.S. warheads would be treated alike, and that they could remain in Western Europe until their associated missiles and launchers were eliminated.

This could be as much as three years after the treaty takes effect, U.S. officials said. Shevardnadze was also said to have accepted the U.S. position that the Pershing IA missiles and their warheads would not be explicitly included in the treaty.

Shultz and Shevardnadze began what was scheduled to be the last session of their three days of talks in Shultz's State Department office at 9:30 a.m. yesterday. The two ministers and their interpreters and note-takers were joined by presidential national security affairs adviser Frank C. Carlucci and Deputy Foreign Minister Alexandr Bessmertnykh in an intense discussion that continued until 3 p.m., with only a brief interruption for sandwiches from the State Department cafeteria.

According to their spokesmen, the ministers spent much of their time receiving and reviewing the output of "working groups" of lesser officials who labored on specific parts of the extensive U.S.-Soviet agenda. In addition to nuclear testing, the topics being considered were human rights and humanitarian issues, chemical weapons, intermediate-range arms, strategic and space arms, and conventional military forces.

Gerasimov said the conventional arms discussions included consideration of "tactical nuclear weapons," whose reduction would be the next step toward a denuclearized Europe in the view of some Western officials. Redman interjected that consideration of the battlefield nuclear weapons is not part of the U.S.-Soviet agreement.

Late yesterday afternoon, Shultz and Shevardnadze slipped out of the State Department without being observed by reporters and photographers to meet Reagan at the White House. The meeting was later made public by the White House.

The two ministers returned to the State Department for about 30 minutes, and Shevardnadze and his party left there for the day around 7 p.m. It was announced shortly thereafter that the officials had "completed their business" and no further meetings between them were scheduled.

U.S. officials, reflecting a longstanding split in the administration, disagreed about the significance of the Soviet Union's new proposals on space weapons. As one option, the Soviets suggested a series of detailed limits on space weapons testing, U.S. officials said. The proposed Soviet limits were said to be close to potential limits under development by some State Department analysts in an effort to clarify what is permitted and prohibited by the 1972 Antiballistic Missile (ABM) Treaty.

In an alternative proposal, the Soviets were described as possibly willing to accept a U.S. commitment to abide by the original interpretation of the ABM treaty for a specified period of time, without detailed specification of research and testing limits.

Calling these proposals promising, some U.S. officials said they demanded a reciprocal display of U.S. flexibility on the touchy issue of building a missile defense in space, the Strategic Defense Initiative (SDI). Other officials said the Soviet proposals were not different enough to merit any new U.S. response.

U.S. officials said the Soviets, in another concession, agreed to limit the concentration of nuclear warheads on any one leg of the strategic triad -- missiles, bombers, or submarines -- to 60 percent of the total arsenal. The Soviets had proposed this in 1985 but backed away a year later.

Soviet acceptance of such a limit has been a key U.S. demand, because it would shrink the Soviet force of land-based missiles of greatest concern to the Reagan administration.Staff writer Sarah Helm contributed to this report.