The United States and Vietnam agreed today to intensify efforts to resolve within two years the issue of American servicemen missing in action and investigate reports that living Americans have remained in the country since the Vietnam War, U.S. officials said.

The agreement was reached during a 24-hour visit to Hanoi by the highest-ranking American delegation to go to Vietnam since the war ended in 1975.

The seven-member delegation, led by Assistant Secretary of Defense Richard L. Armitage and Assistant Secretary of State Paul D. Wolfowitz, conferred today with Vietnamese Foreign Minister Nguyen Co Thach before returning to Bangkok.

On its return, the delegation was greeted by reports from the United States that a half dozen former military and intelligence personnel have filed affidavits alleging that the State Department, Pentagon, Central Intelligence Agency and the U.S. Embassy in Bangkok have suppressed reports of living U.S. prisoners of war in Vietnam and Laos. Armitage sharply denied the allegations, which he called "specious" and "absurd."

He said such charges "harm our ability to prosecute this issue to the fullest possible accounting" of the 2,441 Americans still unaccounted for since the Vietnam War.

"Thach expressed the hope that this question could be resolved in the shortest possible time frame, even sooner than Vietnam's goal of two years," Armitage told a news conference here.

He said the two sides had agreed on holding a technical meeting in Hanoi next month, when the Vietnamese would produce information on 50 Americans whose bodies have not been recovered. The U.S. side would provide the Vietnamese with further data on crash sites of American warplanes, Armitage said.

He said Thach agreed that "multiple crash site excavations" would be carried out in the future as part of U.S.-Vietnamese cooperation on the MIA issue.

Hanoi reversed a longstanding policy and allowed American specialists to participate in a joint excavation of a U.S. B52 bomber crash site on Vietnamese soil in November. Pieces of airplane wreckage and some bone fragments were found, but experts doubted whether they were sufficient to produce positive identification of missing servicemen.

Armitage said the two sides discussed the possibility of establishing a U.S. technical office in Hanoi to promote the search for missing Americans but that they agreed it was unnecessary at this point.

He said there was no discussion of establishing diplomatic relations between the two countries or of other issues unrelated to the MIA question.

"The United States welcomes these further commitments to move forward much more rapidly than in the past to resolve the status of Americans still missing and end the uncertainty of their families," Armitage said. "We also welcome Hanoi's renewed agreement that this is a humanitarian issue not linked to normalization or any of the differences between our governments."

He said the U.S. team had turned down a Vietnamese offer to visit an airplane crash site and a villa in Hanoi where an American technical office could be housed. He said U.S. experts already had visited the crash site and that the delegation considered discussions with the Vietnamese more useful than seeing the villa.

Hanoi has been seeking the establishment of diplomatic relations with the United States to end its international political and economic isolation following its December 1978 invasion of neighboring Cambodia. But Washington has been careful to avoid any movement toward diplomatic ties in its dealings with the Vietnamese on the MIA issue.

Armitage reserved his harshest comments for allegations in the United States that the Reagan administration has covered up existence of living POWs in Indochina. The charges were contained in affidavits filed yesterday in Fayetteville, N.C., in support of a suit by two retired Green Berets.

"We are serious people, and we are involved in a serious effort," Armitage said. "I don't take kindly to those allegations or even those affidavits." He added, "We have people who work on this issue day in and day out who themselves were prisoners of war, and I find it absolutely unbelievable that one could then accuse them of not having the highest possible regard for the fate of their comrades.

"I think those reports are specious," he said. "The allegations of a cover-up are absurd."

Among those who filed affidavits were Jack Bailey, a former Air Force officer active in fund-raising efforts to mount rescue operations for American prisoners who he believes are still being held in Laos.

Others who filed affidavits, according to news agency reports, were Scott Barnes, a former Army member; Thomas Ashworth, a former Marine pilot; A.L. Shinkle, who has served in Air Force intelligence; Jerry Mooney, a former National Security Agency intelligence analyst; and an Indochinese businessman who did not give his real name.

The businessman claimed to have seen 39 heavily guarded men in Laos as recently as October. He said that he "very strongly" believed them to be Americans.

Asked about the prospect that POWs were still being held, Armitage said, "Thus far we have not been able to prove that Americans are held against their will in Indochina. But information in our possession precludes our ruling out that possibility. So we act under the assumption that there are at least some Americans held against their will, and live sighting reports have received and will continue to receive the highest national priority in an attempt to resolve this issue."

He said that "the Vietnamese said there are no Americans held against their will under their authority. But if we had information to the contrary, to the extent we provided it they would investigate."