Vice Premier Teng Hsiao-ping laid the groundwork at the White House yesterday for new Sino-American working relations, and then moved to Capitol Hill to reassure Congress about the future of Taiwan.

Both missions, by all accounts, met with a measure of success. President Carter was enthusiastic in his description of the tone and substance of the White House meeting. Comments from legislators, some of whom asked for autographs, as if the Chiness leader were a matinee idol, indicated that many of them were reassured and impressed.

In the East Building of the National Gallery of Art last night, Teng made his strongest attack on the Soviet Union since arriving in the United States. Speaking to a reception hosted by the Foreign Policy Association, he charged the Soviets with seeking global domination, and said Moscow is backing Vietnam's "massive armed aggression" against Cambodia.

Rebutting Soviet charges that China seeks world onflict, Teng said his nation speaks constantly of the danger of war "not because we like it, but because the danger is a fact, and it comes precisely from the war-mongers who are daily propagating an illusion of peace and detente."

It was another long and busy day for the 74-year-old Chinese leader, who is considered by Carter administration officials to be the leading figure in the ruling Peking order. As reported by White House and congressional sources, Teng:

Agreed to the basic terms of three Sino-American agreements scheduled to be signed in a White House ceremony this afternoon. One is an "umbrella agreement" on science and technology, under the terms of which announcements will be made that China is purchasing a communications satellite, a Landsat mapping satellite and a 50-billion-volt nuclear particle accelerator. The other two agreements to be signed are a cultural exchange pact and an agreement establishing consulates and consular procedures in the two countries.

Took a "positive" attitude toward the early exchange of journalists to be stationed permanently in Washington and Peking. Carter jokingly told Teng, "I'd like to send you about 10,000" journalists, but the Chinese leader replied, laughing, "That's too many."

Told senators that "so long as Taiwan is returned to the motherland and that there is only one China, then we will fully respect the present realities on Taiwan." He added, to House members, that after its acceptance of Chinese sovereignty, Taiwan could retain a large measure of autonomy and even armed forces of its own.

Told House members that China has no objections to U.S. negotiations with the Soviet Union or to U.S.-Soviet agreements. But he raised doubt that such agreements would benefit the United States, and suggested that the Soviets got the better deal in four previous arms control pacts.

An ominous note in the day's developments was a statement to senators about Vietnam that some took as a hint that China might use military force against its neighbor to the south.

According to Senate sources, Teng said China needs to "react appropriately" to secure her borders and must not allow "hegemonists" to run rampant without opposition.

Teng added, according to a senator's notes, that, "In the interest of peace and stability sometimes we may be forced to do something we do not want to do."

According to U.S. intelligence, in the past three weeks China has moved very large military forces, estimated at 10 to 12 divisions, to the border region with Vietnam following the takeover of most of Cambodia by Vietnamese-backed insurgents. Vietnam, in turn, is reported to have ordered a full military alert of its troops along the Chinese border.

U.S. sources say they believe the Chinese augmentation is too large for merely a show of force to impress the Vietnamese. But the sources said there is no clear signal of what China intends to do with the troops and warplanes it has redeployed

Regarding Taiwan, which Teng described to senators as "the crucial question" in the normalization of Sino-American relations, the Chinese leader declined to rule out the use of force. However, he said China believes Taiwan's reunification with the mainland can be achieved peacefully, and noted that "we no longer use the work 'liberation' of Taiwan."

Sen. Jessa A. Helms (R-N.C), an opponent of the normalization of Sino-American relations on the present terms, said he was not satisified with Teng's answer, and claimed that the Chinese "evaded the ultimate question" about the use of force.

However, Sen. Henry M. Jackson (D-Wash.) said, "I don't think in the light of the realities you can expect a different answer."

Senate Majority Leader Robert C. Byrd (D-W Va.) said Teng's statement on Taiwan "goes pretty far," even though it did not close the door to the ultimate use of force. Byrd said his concern about Peking's attacking Taiwan had been "considerably allayed" by Teng.

Teng began his day with a 25-minute private session with Carter in the Oval Office, with only Teng's interpreter joining them. White House officials indicated that the two leaders discussed particularly sensitive questions that the officials would not describe.

A meeting of about 90 minutes in the Cabinet Room followed on a range of bilateral questions. Teng was described by White House sources as decisive and certain in his answers, permitting the swift conclusion of understandings about a long agenda.

One of the American participants wrote a note that described the session as "the most historic meeting" because the groundwork for Sino-American working relations was actually being laid. The previous two White House meetings, Monday morning and afternoon, had dealt with more general global and regional problems.

White House officials suggested that Teng laid the basis for a later resolution of the claims and assets issue, one of the matters standing in the way of normal trade relations. Aviation and maritime agreements were also discussed, and sources reported that the Chinese have been given copies of the air transport agreements the United States has with other nations.

Carter and Teng met reporters and photographers briefly outside the Oval Office after their morning sessions. Carter said the two days of discussion had been "far-reaching... very frank and honest... very cordial and harmonious... extremely beneficial and constructive." He said they had established a relationship for future routine consultation, which will bring "great benefits" to both nations.

Teng responded by saying he agreed to "every work" that Carter said. He added that, because of his visit, he is more convinced than before that the two nations have "broad prospects in various fields -- politically, economically, in the science and technological fields, and in the cultural field, et cetera."

Grasping Carter's hand, he said, "Let us shake hands once again, a handshake between two peoples." Reporters shouted questions, but aides quickly took the michophones away, and the two leaders did not answer.

On Capitol Hill, Teng went first to a luncheon in the Senate Caucus Room, site of the Senate Watergate hearings, for a seated luncheon attended by nearly all members of the upper chamber. The menu was veal and broccoli, and staff aides had supplied chopsticks as well as knives and forks for the Chinese visitors.

As the luncheon was to begin, someone discovered to the general dismay that the chopsticks had been made in Taiwan. Teng did not use them, though it was not clear whether he disliked their origin or simply decided that the fare could be more easily eaten with western utensils.

In the question-and-answer period behind closed doors, Teng said China approves of a dialogue between North and South Korea, and some of the senators said they got the impression that China had encouraged the recent flurry of North Korean statements on possible new talks with the South. Senators quoted Teng as saying that worries about an attack by North Korea on South Korea are "needless."

As in the White House talks earlier, he discussed China's nuclear testing, which has spread radioactive fallout to farflung areas of the world. Saying that both the United States and the Soviet Union had set off many more test explosions, Teng expressed a hope that someday China would be able to cease its atmospheric testing, but made no commitment that it would.

He said China wants to trade with the United States, but must sell more goods here to finance its purchases. He asked for most-favored-nation treatment, now barred, among other things, by the Jackson-Vanik amendment, which ties such a trade status to immigration practices in the case of communist countries.

Jackson said later that there was "no doubt" in his mind that China's immigration practices qualify for most-favored-nation status, but that "it doesn't follow" that the Soviet Union also qualifies. The Carter administration favors granting roughly the same benefits to both rival communist giants in order to avoid a show of favoritism.

Before a late afternoon meeting with the House leadership and members of the International Relations Committee, a number of lawmakers crowded around to ask for Teng's autograph. Rep. Clement J. Zablocki (D-Wis.), the committee chairman, terminated the autograph session to get down to business. To the delight of his visitors, Zablocki began his welcome with several sentences in Chinese.

Today, on his final day in Washington before leaving on a cross-country tour, Teng is scheduled for breakfast with Cabinet members, a private meeting with former president Richare M. Nixon, the White House ceremony to sign the bilateral agreements and a reception he is hosting at China's liaison office on Connecticut Avenue.