A bipartisan group of senators has reached an agreement on gun safety measures with the president saying the deal would be the most significant federal action to combat gun violence in decades.