Scientists are hopeful that "smart" insulins which are undergoing trials could revolutionise the way diabetes is managed.
Instead of repeated blood tests and injections throughout the day to keep blood sugar in check, a single dose of smart insulin would keep circulating in the body and turn on when needed.
Animal studies show the technology appears to work - at least in mice.
Scientists plan to move to human trials soon, PNAS journal reports.
Experts caution that it will take years of testing before treatments could become a reality for patients.
People with type 1 diabetes, who either do not make or cannot use their own natural insulin, rely on insulin injections to stay well.
Without these, their blood sugar would get dangerously high.
But injecting insulin can also make blood sugar levels dip too low, and people with type 1 diabetes must regularly check their blood glucose levels to make sure they are in the right zone.
Diabetes experts have been searching for ways to make blood sugar control easier and more convenient for patients, which is where "smart" insulins come in.
There are a few different types in development, but all are designed to automatically activate when blood sugar gets too high and switch off again when it returns to normal.
Dr Danny Chou from the Massachusetts Institute of Technology has been testing a smart insulin that he and his colleagues developed in the lab.
It is a chemically modified version of regular, long-acting insulin.
It has an extra set of molecules stuck on the end that binds it to proteins that circulate in the bloodstream. While it is attached to these, the smart insulin is in its switched off mode.
When blood sugar rises, the smart insulin switches on - glucose locks on to the smart insulin and tells it to get to work.
Dr Chou said: "My goal is to make life easier and safer for diabetics.
"This is an important advance in insulin therapy."
The Juvenile Diabetes Research Foundation has been funding work into smart insulins.
Karen Addington, chief executive of JDRF in the UK, said: "For many people living with type 1 diabetes, achieving good blood glucose control is a daily battle. Taking too much insulin can drive someone's glucose levels too low, leading to a 'hypo', while taking too little means glucose levels rise too high, which can have a serious cumulative health impact in the long term.
"A smart insulin would eliminate hypos - which are what many with type 1 diabetes hate most. It would enable people with type 1 diabetes to achieve near perfect glucose control, all from a single injection per day or even per week. That's really exciting."
Dr Richard Elliott of Diabetes UK said: "Years of further research and clinical trials will be needed to find out if a similar drug could be used safely and effectively by people with diabetes."
There are two main types: type 1 and type 2
- In type 1, which accounts for about 10% of diabetes, the body's immune system destroys the cells that make insulin
- Type 2 diabetes is when the body either cannot make enough insulin or the body's cells do not react to it
- Insulin treatment is always needed for type 1 diabetes, while if you have type 2 you may be able to control your symptoms by eating a healthy diet, exercising regularly and monitoring your blood sugar.