At 69, Indonesia has the world's highest human toll.
Under Tuesday's agreement, the WHO will develop virus-sharing guidelines and any sharing outside of those "terms of reference", including for vaccine development by drug companies, has to be with the consent of the virus-originating countries.
"Other agreed uses of the virus will also be outlined in the terms of reference, including the standard procedures for providing these seed viruses to vaccine manufacturers ... in a manner to be determined"
World Health Organisation
"We will take the recommendation to a WHO meeting in June to be formalised," Siti Fadillah Supari, Indonesia's health minister, said on Tuesday.
In welcoming Indonesia's decision, the WHO said its collaborating centres "will continue risk assessment on H5N1 virus samples".
"The centres will continue to transform virus into seed virus suitable for vaccine production," it said in a separate statement.
"Other agreed uses of the virus will also be outlined in the terms of reference, including the standard procedures for providing these seed viruses to vaccine manufacturers ... in a manner to be determined."
Some experts, however, disagree with setting conditions on sharing virus samples.
William Chui, from the University of Hong Kong's pharmacology department, said while high-risk countries should get priority access to drugs, "research should not be restricted in any way".
"There should be no bargaining in this because the interest of the world is at stake," he said.
The prolonged row over the sharing of virus samples revealed an imbalance in which developing countries are saddled with costly drugs.
Indonesia and some other developing nations such as Thailand want to ensure that their people have access to vaccines at reasonable prices.
Bird flu has swept through poultry across Asia to Africa and Europe.
Experts say it may mutate into a form that can be passed easily from human to human, possibly killing millions.
Indonesia has had difficulty controlling the disease because so many people keep chickens, ducks and other birds to eat or sell.