American Motors Corp., struggling to keep assembly lines moving at its lone U.S. auto plant, tentatively has agreed to produce cars for Chrysler Corp., beginning in 1987.

Details of the "contract-assembly agreement," now in the form of a memorandum of understanding, could be presented to the public next week, perhaps as early as Monday, sources at both companies said yesterday.

The agreement is unprecedented among domestic auto makers, but such pacts are commonplace among Japanese and European car companies, according to analysts for the domestic auto industry.

Under the plan, AMC would assemble Chrysler's big, popular rear-wheel-drive cars at AMC's underutilized car plant in Kenosha, Wis. Most of the tooling for the project would come from Chrysler, sources said.

There are two possible hang-ups. First, employes at Kenosha, represented by the United Auto Workers, have been asked to accept changes in work rules to enable AMC to achieve greater production efficiencies at the plant.

Voting on work-rule proposals is taking place this weekend. Early reports yesterday indicated that the union would accept.

In addition, the agreement hinges on the willingness of the state of Wisconsin to make available $3 million for employe training. "Those training funds are essential to finalization of the contract," according to one source familiar with the tentative deal.

Chrysler's rear-wheel-drive autos -- known as M-bodies and powered by 5.2-liter, V-8 engines -- include the Chrysler Fifth Avenue, the Dodge Diplomat and the Plymouth Gran Fury. Those cars now are built at Chrysler's St. Louis plant. But Chrysler is converting that facility to minivan production, and the company has no other plant available to handle the M-body cars.

"Chrysler is stretched to capacity," said Dennis Virag, automotive industry analyst for Detroit-based Ward's Automotive Research. And Automotive News, an industry trade journal, recently reported that "Chrysler is operating its existing facilities at the equivalent of 118 percent of straight-time capacity."

Last year, Chrysler produced 161,556 M cars, and 66,410 so far this year.

Demand for the M cars is so strong "Chrysler can't afford to drop them," Virag said. "These cars have been around for 10 years. That means that all of the tooling and everything else for them have been amortized; and that means, with the high demand, these cars represent a rare cash cow for Chrysler."

Under the circumstances, Chrysler had two choices: building a new plant, at a cost of as much as $600 million, or finding someone else to build its M-body cars -- for as long as demand lasts. The contract-assembly solution makes more sense, analysts said.

AMC has lost $767 million since 1980, and much of that drain has come from drastically declining sales of its Alliance and Encore economy cars, which are built at Kenosha. As a result, some 4,500 workers are laid off at AMC Kenosha; another 2,600 are still employed, but the sagging Alliance/Encore sales make their situation tenuous.

AMC said last week it was closing Kenosha for two weeks to help reduce its backlog of unsold subcompacts. AMC officials have said they will close the 1902-vintage Kenosha plant permanently after the last run of Alliance/Encore cars in 1989.

Meanwhile, AMC has been weighing a number of proposals for a single plant to replace the Kenosha plant and its Jeep-manufacturing plant in Toledo. In addition, AMC, the country's fourth-largest auto maker, also has been working on a variety of new vehicles to broaden its now-slender product lineup.

All of AMC's plans will cost money -- much of which will come from its majority shareholder, French auto maker Regie Nationale des Usines Renault, which has pumped $645 million into AMC since taking control of the company in 1979.

But the contract-assembly program will help to generate funds to reduce Renault's burden and give AMC a better chance to survive, said Donald F. DeScenza, an analyst with Nomura Securities Inc. of New York. "AMC is making some good moves, and this is one of them," he said.

If the contract-assembly program works well with Chrysler, AMC will pursue similar projects with other auto makers, said Joseph E. Cappy, AMC's president and chief executive officer.

In an interview earlier this month, in which he speculated on the outcome of his company's planned programs, Cappy said: "If I could do contract assembly for Chrysler, there's no reason why I couldn't do it for someone else.

"I could do it for Ford. I could do it for the Japanese. And I'm willing to do it because I know that I can build a quality product, and I know I could do it efficiently," Cappy said. "That means that I can make money for myself, and give the other guy a good deal, too."