President Reagan met with Mexican President Miguel de la Madrid today and praised his government's efforts to repair its damaged economy and curb international narcotics traffic.

After the meeting, U.S. officials said Reagan had agreed to a Mexican proposal for a "law enforcement summit" at which attorneys general of several Latin American countries would coordinate efforts to stem the international drug flow.

The fourth meeting of the two leaders was described by officials of both sides as harmonious, in contrast to some previous sessions. On Aug. 14, 1983, in La Paz, Mexico, de la Madrid bluntly told Reagan that regional stability in Central America was threatened by U.S. shows of force, "which threaten to touch off a conflagration."

Today the two presidents barely mentioned their differences on Central America in their public statements, although de la Madrid reaffirmed Mexican support for a negotiated settlement in Nicaragua.

Reagan and de la Madrid spent only 10 minutes discussing Central America in the almost two hours of formal talks before lunch, a Mexican administration official said. U.S. officials said that Reagan in private, without pressing the point, reiterated his view that Nicaragua was the principal source of terrorism and subversion in Central America.

Reagan also objected to Mexican support for United Nations resolutions sharply critical of U.S. activities in the region, and of what one U.S. official termed "name-calling" resolutions on such issues as Namibia and South Africa.

But Reagan, like his Mexican counterpart, also was more conciliatory on Central America than in the past. In a toast, the American president approvingly quoted from a recent de la Madrid statement praising the advance of democracy in Latin America.

The emphasis today was on economic issues. Mexico, where the annual rate of inflation is 60 percent, is struggling to recover from an economic crisis and a foreign debt of nearly $100 billion, the second-largest in the Third World.

The United States has put forward the Baker Plan, named after Treasury Secretary James A. Baker III, who attended today's meetings, to help solve Mexico's problems. It calls for less government intervention, reliance on more private financing and economic reforms.

De la Madrid lauded the proposal, which he called "a step forward," and said he hoped it would become "the starting point for imaginative, efficient formulas."

Mexican Treasury Secretary Jesus Silva Herzog said after the meeting that the Baker Plan did not represent "the definitive solution" for Third World indebtedness but that it was "constructive, positive and useful."

At a luncheon in Reagan's honor, de la Madrid said "Mexicans have made increasingly strenuous efforts in the last years to cope with the country's severe economic crisis." While some U.S. officials have criticized Mexican efforts as insufficient, Reagan responded positively to de la Madrid's declaration.

"Mexico's debt burden remains a serious challenge," Reagan said in a toast. "But I am impressed with the commitment that you have made, Mr. President, to meet this challenge and to take the necessary steps to achieve a robust, growing economy."

Reagan also expressed appreciation for Mexican attempts to curb the flow of narcotics into the United States.

"America joins with you in mourning the death of those valued Mexican officials who have been killed in the struggle against narcotics," Reagan said. "There are tears on both sides of the border for the Mexican policemen killed recently. They have shown honor and courage that transcends international boundaries." Twenty-two policemen were killed Nov. 1 in a narcotics-related shootout in the gulf state of Veracruz.

Reagan also paid tribute to a U.S. Drug Enforcement Administration agent, Enrique Camarena, who was kidnaped in Mexico Feb. 7 and whose body was found April 5. Reagan said Camarena, who was born in Mexicali, was "brutally murdered in the line of duty," and called him "an American hero."

Several alleged drug dealers have been arrested in the slaying, but none has been brought to trial.

Reagan met briefly with Camarena's widow, Mika, this morning at El Centro Naval Air Station in California. Afterward she told a reporter that Reagan had promised to "talk to de la Madrid about my husband's investigation."

Camarena "gave his life for all of us in the fight against the drug trafficking," Reagan said in a brief speech in El Centro.

Later in the day a memorial service was held for Camarena in Calexico, Calif., a small farming town across the border from Mexicali where he was raised. It was attended by John Gavin, the U.S. ambassador to Mexico.

White House officials said Thursday in Los Angeles that U.S.-Mexican cooperation against narcotics traffickers had increased notably since the killing of Camarena.

Despite this cooperation, the U.S. officials said that the drug traffic flow into the United States from Mexico is increasing because, as one said, "the traffickers are extremely rich and extremely powerful, and as we step up our efforts and the government of Mexico steps up its efforts, the traffickers step up theirs."

In his luncheon speech, de la Madrid called drug trafficking a "terrible" crime and said concerted efforts must be made against it.

"The drug trafficking problem will continue to call for priority actions by our governments," the Mexican leader said. "We must act simultaneously and in coordination, with equal force and effectiveness, to do away with" narcotics.

De la Madrid welcomed Reagan at a colorful ceremony in which 21-gun salutes for each president sent smoke drifting across the reviewing stand.

Reagan later flew to Andrews Air Force Base, Md., ending a week-long vacation.