Amazon's ambitious plan to bring down the costs of health care is getting an early test in a familiar place: its Seattle headquarters.

The company is in internal discussions to open primary care clinics at its main office, according to two people familiar with the matter. The early plan is to hire a small number of doctors to start a pilot clinic later this year for a select group of employees and then expand it to more workers in early 2019, said the people, who asked not to be named because the plans are confidential.

Amazon is taking a leading role among American companies in pushing for ways to bring down health costs, which are skyrocketing as insurers pass on the expenses associated with emergency room visits and providers that overcharge. By steering workers to urgent care and preventative care and by offering guidance on diet and exercise, companies are hoping to keep their employees healthier and out of the hospital.

In January, Amazon announced a partnership with J.P. Morgan Chase and Berkshire Hathaway to improve the quality of care and bring down costs. To run the joint venture, the group recently appointed Atul Gawande, who has spoken out about the importance of "regular, ongoing care," calling it "the greatest source of value in modern medicine," in a 2017 report.

Amazon was previously looking to outsource its clinics and brought vendors in to pitch their services. After numerous rounds of discussions, Amazon ultimately decided to develop clinics internally, one of the people said. Providers including Crossover Health and One Medical offer on-site or nearby services for other companies, including those in the technology sector.

An Amazon spokesperson declined to comment.

The move would echo Apple, which is developing clinics for its employees and their dependents. An Apple subsidiary called AC Wellness Network has already hired more than 40 people for those clinics.

Amazon started its effort by hiring primary care experts, beginning last year with Christine Henningsgaard, who was previously vice president of operations at One Medical. In January, the company brought in Martin Levine from Iora Health, a primary care group with clinics in Seattle.