Read the the agreement again. It only mandates that the countries that signed the agreement wouldn't be the ones to attack Ukraine - it didn't include any obligation to defend them.
Shows exactly how much international agreements are worth: One of the countries that signed the agreement was Russia.