THE MEXICAN DEBT agreement is a victory for common sense. It's by no means a final victory, for it represents only one step in the management of Mexico's enormous foreign debt and Mexico's return to economic growth. But things are now moving in the right direction, and that's enormously important to the United States. As a matter of foreign policy, Mexico's stability ranks second only to the Soviet strategic relationship in its significance to Americans in the coming decade.

Under this agreement the lenders will make extraordinary concessions to Mexico, and Mexico will make extraordinary efforts in its own behalf. The agreement, signed by Mexico and the International Monetary Fund with the active support of the World Bank and the Reagan administration, does not merely try to help Mexico carry its present debts. Mexico has to be able to carry them in terms that will permit its economy to expand, and that will permit it to continue to borrow. The drop in the price of oil has made Mexico's borrowing requirements imperative.

Mexico, on its part, has apparently abandoned demands for interest rates below market levels, which would threaten higher interest rates to the banks' other borrowers. Beyond that kind of negotiating concession, Mexico is now moving steadily ahead with the most profound kind of internal reforms. It is closing money-losing state-owned enterprises. It is beginning to dismantle the protectionist practices that preserve highly profitable inefficiency for well-connected businessmen. President Miguel de la Madrid and his government are already paying a substantial political price for these reforms, and Americans should not underestimate the risks that Mr. de la Madrid is running.

It's far from certain that the commercial banks will go along and put up their half of the $12 billion in new loans that the agreement would provide over the next 18 months. But the best bet is that, with the usual grumbling, they will cooperate. Otherwise, if there were a Mexican default, they might well be blamed for it. None of the American banks is likely to expose itself to the consequences of that -- not with the U.S. Treasury actively supporting the agreement. If the American banks cooperate, the Japanese and Europeans will follow.

None of that can guarantee success. The present phase of Mexico's distress is wholly owed to one unpredictable event, the sudden collapse of oil prices last winter, and no doubt other unpredictable events lie ahead. But the agreement demonstrates that the international system -- meaning Mexico, the Reagan administration and the IMF -- are capable of dealing skillfully with an international economic crisis of the greatest urgency.