Negotiators for Pan American World Airways and about 5,800 striking ground crew workers reached a tentative agreement today on a new contract to end the 23-day-old walkout, company and union officials said.

"We have definitely reached a tentative agreement, but we remain on strike until this agreement is ratified," said Kevin Connelly, a senior steward for for Transport Workers Union Local 504, the largest TWU local on strike.

A ratification vote is expected to take place in several days, possibly Tuesday.

One union official said he would recommend against ratification.

"We didn't get anything. There's not one proposal for the membership that's in that agreement," said Hank Williams, vice president of Local 504.

Meanwhile, negotiations have resumed between Pan American and flight attendants as the airline reinstated 157 who were fired and their union agreed to stop asking travel agents to boycott the carrier, officials said.

The deal was achieved Friday by National Mediation Board member Walter C. Wallace, who said it was crucial to efforts to avert a second strike against Pan Am.

The battle began when TWU mechanics struck Feb. 28, grounding more than half the airline's 400 daily flights. Pan Am's 6,000 flight attendants honored TWU picket lines even after pilots began returning to work in the second week of the strike. The airline fired 157 attendants.

The airline restored transcontinental service Friday for the first time in the 3-week-old strike. All union flight attendants assigned to flights from Los Angeles to Miami and New York were reporting to work, said Jeff Kriendler, a Pan Am vice president.

The major issues in the TWU dispute included pay increases totaling 14.5 percent over three years the union agreed to forgo in 1981 when employes accepted a 10 percent wage cut to help keep the airline solvent.

Also in dispute were work rule changes, the company's right to hire part-time workers and the jobs of more than 700 TWU members who worked in flight kitchens that Pan Am sold during the strike.