In an unprecedented action, President Carter has told federal agencies that, before approving new projects in foreign countries, they must first analyze the environmental consequences.

The executive order, signed by Carter before he left for the Guadeloupe summit, comes after almost a decade of debate between environmentalists on the one hand and the affected agencies and the business community on the other.

The order would require, for example, the Export-Import Bank to write environmental assessments on export loans for American-made nuclear reactors. Similarly, other federal agencies, including the Defense Department, the State Department, the Agriculture Department or the Overseas Private Investment Corp., would be forced to document the environmental effects of their various international projects.

The order opens to public scrutiny a vast new area of federal action that has until now been conducted in relative secrecy. It could slow down major international projects, such as the Philippine reactor under construction near an earthquake fault.

The State Department has vigorously opposed such requirements since the President's Council on Environmental Quality first proposed them formally last year. State and other agencies claimed they would violate foreign nations' sovereignty and inhibit American exports.

Environmentalists have been trying for years to bring agencies with foreign responsibilities under the 1969 National Environmental Policy Act. The Agency for International Development has complied with NEPA for several years, but others have resisted fiercely.

Charles Warren, chairman of the Council on Envronmental Quaility, said the executive order "responds to a growing worldwide concern that governments are undertaking major actions without enough consideration of the consequences. The unintended results may be to endanger health, safety and the human environment."

The president's order is the result of seven months of what one participant called "Begin-Sadat-like negotiations" between State and CEQ. It is, he said, a compromise document which grants significant exemptions and gives agencies broad leeway in writing regulations.

The five-page order requires environmental impact statements or assessments of federal actions that:

Affect the global environment, including the oceans, the atmosphere or Antarctica.

Involve radioactive hazards -- nuclear reactors are included, but fuel shipments are exempt.

Affect a country not involved in the project -- for example a water project in Jordan that could harm Israeli resources.

Involve natural or ecological resources of global importance, such as endangered species in Africa or tropecal forest ecosystems.

The order exempts disaster and emergency relief action, intelligence activities and arms transfers, actions involving national security sensitivity or actions occurring in the course of armed conflicts, and non-nuclear export licenses.

Federal agencies have eight months to develop regualtions after consultation with CEQ and State.

The order comes in the wake of three court suits trying to force federal agencies to document the effects of their actions. The Natural Resources Defense Council, an environmental group, sued Ex-Im Bank over nuclear reactors, oil drilling equipment, steel mills and dredges. The National Organization for the Reform of Marijuana Laws sued over U.S. participation in spraying Mexican marijuana fields with the herbicide paraquat. And a German citizens' group sued to stop the construction of a U.S. Army housing project in West Berlin.

An amendment introduced in Congress last year by Sen. Adlai E. Stevenson (D-Ill.) would have exempted foreign projects from environmental laws. However, it was killed after the intervention of Sen. Edmund S. Muskie (D-Maine) and others.

Jacob Scherr, an NRDC attorney, said the order is "an important step forward" in requiring environmental assessments, but "we're going to have to see what kind of regulations the agencies come up with."

The nuclear fuel exemption is "unfortunate," he said, because "nuclear reactors built 10 years ago abroad could be in horrendous shape while we are still shipping them fuel."