With the rapid rise in technology for the precision detection and modulation of electrical signalling patterns in the nervous system, a new class of treatments known as bioelectronic medicines seems within reach1. Specifically, the peripheral nervous system will be at the centre of these advances, as the functions it controls in chronic diseases are extensive and its small number of fibres per nerve renders them more tractable to targeted modulation. The vision for bioelectronic medicines is one of miniature, implantable devices that can be attached to individual peripheral nerves anywhere in the viscera, extending beyond early clinical examples in hypertension2 and sleep apnoea3. Such devices will be able to decipher and modulate neural signalling patterns, achieving therapeutic effects that are targeted at single functions of specific organs. This precision could be further enhanced through closed-loop control: that is, devices that can record neural electrical activity and physiological parameters, analyse the data in real time and modulate neural signalling accordingly1. For this vision to be realized, a solid research foundation for bioelectronic medicines is needed. This article puts forward a roadmap for the next 5 years towards generating that base.