The Reagan administration said yesterday it would seek additional military and other assistance for El Salvador as part of the U.S. response to the murder of 13 people, including six Americans, in a San Salvador cafe Wednesday night.

White House spokesman Larry Speakes called the killings "an act of indiscriminate terrorism." He ruled out any direct U.S. military retaliation, but pointedly did not rule out such an effort by El Salvador.

"That's the only purpose and obvious purpose" of beefed-up U.S. aid, Speakes told reporters at a briefing. "We have confidence in El Salvador to deal with this problem."

Later in the day, he said, "We are prepared . . . to provide them with the assistance they need to do the job themselves."

Speakes said he "strongly suspects" that the attackers were leftist guerrillas dressed as Salvadoran soldiers. He said the administration had dismissed the possibility that they might have been members of the Salvadoran security forces, which have been involved in terrorist attacks in the past.

Pentagon spokesman Michael I. Burch said the cafe killings were an "act of barbarism" that apparently reflects a decision by Salvadoran rebels to step up urban attacks after suffering military setbacks in rural areas.

"Although no one has yet claimed responsibility for this act," Burch said, "it has all the appearance of leftist terrorism that has been on the increase in recent months as a reaction to the guerrillas' military reversals in the countryside."

Both men said, and other sources confirmed, that the attackers shot first at two tables of Marines and then sprayed bullets in every direction.

John C. Kelly, deputy director of Agency for International Development's office of information resource management, who has worked on computerizing Salvadoran elections since 1981, said here that five of the dead, including the two American civilians, were all employes of Wang Laboratories Inc., of Lowell, Mass., and its Salvadoran subsidiary, which was doing work for AID, and that the five were at a table next to the Marines.

"A survivor, Mario Lopez, also with Wang, told me by telephone it was clear to him that the target was the Marines," Kelly said. "He said they the attackers looked at the other table and when they saw Americans there, they went for them as well."

Kelly said the Cafe Mediterranee, one of a string along the street, was a popular hangout for the Marines and AID people and that the Marines had been sitting at outdoor tables for nearly two hours when the attack occurred.

State Department spokesman Bernard Kalb told reporters that the U.S. Embassy had a policy "prohibiting employes from eating at outdoor cafes" and all personnel had been briefed on it.

Speakes read a statement by President Reagan promising to "immediately provide whatever assistance is necessary" to the government of Salvadoran President Jose Napoleon Duarte "to find and punish the terrorists who perpetrated this act."

Reagan promised expedited delivery of aid now in the pipeline and said he would use his emergency authority if necessary to provide "additional military assets."

Congress approved $128.2 million in military aid for El Salvador in fiscal 1985 and is considering an administration request for $132.6 million for fiscal 1986. Reagan's statement said he would consult with Congress on the next steps, which are expected to include a supplemental appropriation request for this fiscal year. Congressional staff members said no request had yet been submitted.

Speakes said the FBI might provide technical help in determining responsibility for the attack, as well as unspecified increases in intelligence capability. Burch said he knew of no plans to increase the number of U.S. military trainers in the Central American country beyond the administration's self-imposed ceiling of 55.

"The business of intelligence and technical assistance will be put in motion very quickly," Speakes said, adding that it was "entirely possible" that there would be more terrorist attacks.

Asked whether the off-duty Marines had been armed, Burch said off-duty Marines stationed outside San Salvador have permission to carry personal weapons for self-defense, but Marines in the capital, including the four killed Wednesday, cannot.

Burch said the U.S. ambassador has discretion to permit sidearms and restrict movement of military personnel in risky areas of El Salvador, although the area where the shooting occurred, near the U.S. ambassador's residence, was thought to be "relatively safe."

House Minority Leader Robert H. Michel (R-Ill.) said in a speech to the House that the killings were part of "the inevitable terror" of communism.

"The trigger was pulled by the Sandinista leadership in Managua," he said, referring to the leftist government of neighboring Nicaragua, which the Reagan administration has repeatedly called the chief arms supplier to the Salvadoran guerrillas.

Elliott Abrams, at a Senate Foreign Relations Committee hearing on his nomination to be assistant secretary of state for inter-American affairs, said the slayings ironically indicated that U.S. policy in El Salvador had been successful because the guerrilla left has given up trying to win the five-year-old civil war in the countryside.

"They know they cannot win the war, and so they are pushed into this kind of barbaric terrorist act," Abrams said. "El Salvador is really a great success story."