Modern electronics is getting smaller and more capable all the time, and all sorts of sensors and communication systems are being developed to sense chemicals, forces, etc and communicate them back to a base station. But you still have to power the systems, and chemical batteries have a limited life, and get less efficient in space as they get smaller.
One obvious incredibly high density form of energy is from radioactive decay. Thi s stores at least 100 times as much energy as the same amount of chemicals. The problem is getting the energy out. Various spacecraft generate energy from the heat produced by the decay but this is inefficient, particularly in high temperatures, and doesn't scale down well.
Another approach is to use the radiation to directly stimulate a structure like a solar cell, which will produce electricity in the same way as it would with light, this can be scaled down to be very small. The problem is that the radiation damages the crystal structure of the semiconductors in the cell and makes them less and less efficient.
Researchers at the university of Missouri may have come up with around this problem - use a semiconductor which is not crystaline and is in fact a liquid. they have used Selinium and radioactive Sulphur 35 as the radioactive source to produce a battery smaller than a 2p coin. It is at present not very powerful about 16nW with an effciency of about 1.2% which doesn't degrade over time.
This is not very much power but enough for some applications and of course this is very early days so it should get a lot better with new developments.