A Battery Management System contains all the onboard controls necessary for a battery to manage its components. Depending on the complexity of the battery, this includes when to (dis)charge, temperature control, cell balancing, high voltage connections, safety monitoring, and more. A good BMS is crucial in using a battery efficiently and maintaining a long life.
An open-source BMS could play a huge role in the advancement of battery technology. If only automakers would do the same. :)