GENEVA (AP) _ Ten years after international agreement was reached on guidelines to promote breast-feeding, many mothers in the Third World still are switching to formula and unwittingly placing their infants' lives at risk.

The World Health Organization's 1981 code of practice on formula marketing -accepted by all WHO members except the United States - has helped improve the behavior of major formula makers.

But violations continue, and so do infant deaths, said Dr. Mark Belsey, head of WHO's Maternal and Child Health division.

Belsey says WHO campaigns are trying to drive home the benefits of exclusive breast-feeding until the age of 4 to six months, the same recommendation made by the American Academy of Pediatrics.

The 1981 WHO international code aims to prevent manufacturers from persuading mothers that they need formula to nourish their babies.

It bans direct formula advertising to the public and distribution of formula samples to pregnant women. It permits donations or concessionary sales of infant formula for distribution to infants who cannot be breast-fed, but says the formula should not be used to promote sales.

The code is non-binding, however, and WHO has no regulatory powers. It is up to individual countries to decide whether they want to incorporate it into national law. Thirty-one countries have adopted all or part of it as law. Another 27 support voluntary compliance with all or part of the code.

The United States is the only industrialized country among 31 other nations where no action has been taken on the WHO code. It voted against the code in 1981, saying that restrictions on formula marketing were contrary to the philosophy of free enterprise.

National governments are responsible for checking on whether companies abide by the guidelines, and must report to WHO every two years on progress.

In its report last year to WHO, for example, the Philippines said manufacturers still promoted infant formula, displayed posters in health centers, and found ways of distributing samples to mothers.

The country reports do not single out individual companies guilty of abusing the guidelines, and Belsey said the smaller, local companies often are the worst offenders.

''What we find more often than not is that national manufacturers of breast-milk substitutes are less aware and comply less frequently with the code,'' he said. ''Multinationals are aware of the spotlight that is on them.''

Belsey said that if measures to promote breast-feeding are to be effective, the whole industry must take part.

He cites the example of Nestle, which withdrew all supplies from hospitals in Thailand to assess the impact on breast-feeding. Other companies merely stepped in to fill the gap, he said.

Nestle has been the target of a worldwide consumer boycott for a decade because of its marketing of infant formulas in developing nations.

American Home Products Corp., another American formula maker that has aggressively marketed in developing nations, also is being boycotted, said Howard Bozich, executive director of Action for Corporate Accountability, which monitors infant-formula abuses.

Eighteen other companies, some from Western Europe and Japan, sell formula in poor nations in violation of the WHO code, he said.

The Nestle boycott ended after the company agreed in 1984 to follow U.N. marketing guidelines. But it was renewed in 1988 when consumer activists accused Nestle of ''dangerous, and in some cases, illegal methods'' to sell formula, a charge the company denied.

Recently, both American Home Products and Nestle pledged to stop dumping large amounts of free or discounted formula in Third World hospitals.