IT SEEMED LIKE a great idea back in 1955. Private citizens wishing to honor a former president would donate money to build a library to house his papers. Since the beneficiaries of the gift would be the American people, the federal government would then assume all the costs of operating and maintaining the libraries. It wouldn't cost much, proponents thought. Probably about $100,000 annually for each facility. Since then, as everyone knows, both the libraries and the budgets have grown beyond all expectations. Seven presidential libraries have now been established, and each one costs the taxpayers about $2 million a year to operate and maintain.

Last week Congress completed action on legislation designed to bring the library cost explosion under control. The approach is not to curtail services but to get more private money into the cause. This will be done by requiring each library to have an endowment -- privately raised -- equal to 20 percent of the cost of construction. Funds generated by the endowment would then be used to subsidize operating and maintenance costs. Presidential libraries are to be limited in size to 70,000 square feet, but larger structures will be approved if a proportionately greated endowment is raised. The archivist of the United States is given far more authority to establish architectural and design standards for new libraries, and must give Congress 60 days to review any proposed plan to acquire a building.

One reason presidential libraries have been both controversial and expensive to operate is the impulse of a president's friends and supporters to build a shrine. Some libraries incorporate museums filled with personal memorabilia; others are of such splendid design and high-tech excellence that upkeep is staggering. The response of Congress is to require those who build extravagant facilities to share more of the cost of upkeep.

The library being planned for President Reagan's papers won't be covered by the new law because it applies only to chief executives elected after Jan. 20, 1985. That's too bad because the Reagan facility is expected to be twice as costly as any other. In the long run, though, the law will give the government badly needed supervisory power over these projects and save many millions each year by capping runaway costs. That makes sense.