CVS has reached a deal with the federal government to give out a Covid-19 antibody treatment in patients’ homes and long-term care facilities, the pharmacy chain announced on Wednesday, providing a new way for certain high-risk patients to get a drug aimed at keeping them out of the hospital.

The treatment, called bamlanivimab and developed by Eli Lilly, has been administered mainly at hospitals since it received emergency authorization from the Food and Drug Administration less than a month ago. Since then, the federal government has distributed to state health departments nearly 170,000 doses of the treatment, though only some of those doses have been given to patients so far. The federal government has purchased 950,000 doses to last into January, including the doses that have already been distributed.

The three-month pilot with CVS involves just 1,000 doses, enough to treat 1,000 Covid-19 patients. It’s not clear how much impact that will have as the virus is spreading rapidly and demand for treatments is surging. More than 184,000 new coronavirus cases were reported in the United States on Monday.

“Even with this partnership, we’re talking about a very limited resource,” said Dr. Robert Goldstein, an infectious-disease physician at Massachusetts General Hospital. “We still don’t have a way to deliver it equitably, and I’m not sure that the CVS partnership is necessarily going to improve equity in distribution.”

Still, giving the treatment in residential settings could help get around a big logistical challenge: The drug is meant for people with mild to moderate symptoms who would normally be advised to stay home. But because the drug must be infused intravenously by a clinician, these Covid-19 patients have to go to a clinic or hospital to get it. That has forced hospitals to find ways to keep these patients away from other vulnerable people getting infusions for cancer and other conditions.

“We believe that this is a much more patient-friendly way to treat, in the comfort of someone’s own home or without having to be transferred,” said Dr. Sree Chaguturu, the CVS executive helping to lead planning for the pilot program.

The program will be limited for now to seven metropolitan areas: Boston, Chicago, Cleveland, Los Angeles, Milwaukee, Minneapolis and Tampa, Fla.

Those sites were chosen based on factors including their location, infrastructure and clinical capacity, said Michael Pratt, a spokesman for the U.S. Department of Health and Human Services.

The treatment is intended only for patients with certain risk factors, such as being over age 65 or having medical conditions such as obesity or diabetes. When an eligible patient tests positive for the coronavirus, providers can order the treatment and refer the patient to CVS’s home infusion unit, Coram, if they think it would be the best way for the patient to get the infusion.

If patients are confirmed to be eligible, Coram will send nurses to their residences to administer the treatment. The medication drip takes an hour, and then the patient is monitored for any side effects for another hour or so.

The treatment offers another tool to try to keep patients out of the hospital, but experts have been cautious about embracing it. After the drug received emergency authorization, a National Institutes of Health panel said that there was not enough evidence to recommend for or against it and that it should not be considered the standard of care. An infectious-disease society recommended against the treatment’s routine use.

Dr. Chaguturu would not disclose the financial terms of CVS’s deal with the Department of Health and Human Services, but he said CVS was being paid for the pilot program as a whole, not for each patient to whom it gives the treatment. (He said CVS had an option to extend the pilot to distribute another 1,000 doses.) The drug itself is available free of charge to patients, though some seniors on Medicare who don’t have supplemental insurance coverage will have to pay a fee of about $60 to have it administered, federal officials said last month.

Separate from the deal to distribute the antibody treatment, CVS’s retail business will play a prominent role in administering vaccines once they are authorized. The federal government has agreements with CVS and Walgreens to send pharmacists into nursing homes and similar facilities to vaccinate residents and workers there — a group that an advisory panel to the Centers for Disease Control and Prevention on Tuesday recommended should be first to get the vaccine, along with health care workers.

CVS and other pharmacies are also set to play a key role in vaccinating the general public once vaccines are more widely available.