Polish Communist Party leader Stanislaw Kania flew to East Germany today to reassure another uneasy Warsaw Pact ally as the new government of Premier Wojciech Jaruzelski appeared to have averted major student unrest throughout the country.

During a visit to East Berlin Kania met with East German leader Erich Honecker and briefed him on the latest developments in the polish crisis. He had a similar, surprise meeting on Sunday with President Gustav Husak of Czechoslovakia.

East Germany and Czechoslovakia have taken the lead in criticizing the Polish independent trade union federation Solidarity, and by implication the Polish government itself, for letting those "anarchy and chaos" in the country.

During the last few days, however, and particularly since the appointment of Gen. Jaruzelski as premier, the press criticism has become more muted. For its part, Poland has been trying to convince its allies that it can handle its own problems.

Meanwhile, government ministers and student leaders said a final agreement on the students' demand for their own independent union will be signed Wednesday.

The official Polish news agency PAP said the government had agreed to the demand, but it was not immediately clear whether students nationwide would feel it necessary to vote on the accord after it is signed.

Earlier in the day, a student strike centered on the city of Lodz was spreading rapidly to the rest of the country because of delays in reaching final agreement.

Student leaders then met with the deputy premier responsible for trade union negotiations, Mieczyslaw Rakowski. After the meeting, Education Minister Janusz Gorski said the agreement covering the registration of the new union and other largely academic grievances would be signed Wednesday. t

Echoing Gorski, student leader Jacek Czputowica said, "Tomorrow in Lodz the agreement will be signed and the strike will be over then." Czputowica was one of the four-members student team negotiating the agreement with rakowski.

Gorski said that the statutes of the new union would include a clause stipulating that strikes could only be called in future if a least 50 percent of the student body voted in favor. This point led to the breakdown of talks earlier in the week and the escalation of strikes is sympathy with the Lodz students.

Today, tens of thousands of students from major Polish universities, including Krakow, where 2,000 students occupied five faculty buildings, and Warsaw, joined the strike.

Other sympathy strikes were staged at colleges in Wroclaw, Czestochowa and Katowice. Students in the Baltic Coast city of Gdansk threatened to strike on Wednesday.

Behind the scenes, however, Solidarity leaders have been exerting pressure on the students to reach a final settlement with the government. Many students are also preparing for exams.

Full settlement of the student strike would be a valuable boost to the government, which has called for 90 "strike-free" days. If the students settle, the only social group still in active dispute with the government would be farmers, who have occupied an administrative building in the southeastern town of Rzeszow.

Farmers' leaders, however, have agreed to suspend their demand for registration of an independent trade union while a new draft law on trade unions is being discussed. Negotiations resumed in Rzeszow today on the farmers' other grievances after a short break while the government team secured authority from Warsaw to sign a final agreement.

The officially controlled Polish news media are making an enormous effort to drum up popular support for Gen. Jaruzelski's new government. Telegrams of support for his call for a strike moratorium are are read out every day on the evening television news and republished in the press.

The psychological impact of the change in premier depends on the rapid restoration of social peace in the country and Jaruzelski's ability to convince Solidarity that he does not want to whittle away gains made by

For the moment, the new premier's strategy appears to be succeeding, although Solidarity leaders have made clear that they will withhold final judgement until detailed talks with the government. For its part, the government has done its utmost to settle one strike after another.

The strategy also depends on whether the Polish leadership can persuade its Soviet Bloc allies that its more conciliatory line toward Solidarity is indeed producing positive results. This explains why Kania has devoted such attention to East German and Czechoslovak leaders prior to next week's Soviet Party congress in Moscow.

While Kania was meeting Honecker at a hunting lodge outside East Berlin, Jaruzelski was meeting with the ambassadors to Poland of the Soviet Union and other Warsaw Pact states.

Western analysts in East Berlin, however, said the East German leadership still appeared skeptical about the ability of the Polish authorities to control events in the long term. A communique issued after today's talks said merely that the meeting was held "in a friendly atmosphere" and agreement was reached "on all matters of substance."