A new algorithm is developed to identify the flavour of neutral B mesons at production in pp collisions by utilising all tracks from the hadronisation process. The algorithm is calibrated separately for B0 and Bs0 mesons using B0→J/I¨K+I¨− and Bs0→Ds−I¨+ decays from pp collision data collected by the LHCb experiment at a centre-of-mass energy of 13\,TeV. This new algorithm improves the tagging power by 35\% for B0 mesons and 20\% for Bs0 mesons when compared to the combined performance of the existing LHCb flavour-tagging algorithms.