When Ukraine became independent in 1994 after Russia collapsed, an agreement was signed by Russia concerning the disarmement of Russian nuclear missiles stationed in Ukraine.
At that time an agreement was signed by Russia, that agreed to:
1. respect the independence and sovereignty and the existing borders of Ukraine;
2. reaffirm their obligation to refrain from the threat or use of force against the territorial integrity or political independence of Ukraine, and that none of their weapons will ever be
used against Ukraine except in self-defence or otherwise in accordance with the
Charter of the United Nations;
3. refrain from economic coercion designed to subordinate to their own interest the exercise by Ukraine of the rights inherent in its sovereignty and thus to secure advantages of any kind;
4. provide assistance to Ukraine, as a non-nuclear-weapon State party to the Treaty on the
Non-Proliferation of Nuclear Weapons, if Ukraine should become a victim of an act of aggression or an object of a threat of aggression in which nuclear weapons are used;
5. not to use nuclear weapons against any non-nuclearweapon State party to the Treaty on the Non-Proliferation of Nuclear Weapons, except in the case of an attack on themselves, their territories or dependent territories, their armed forces, or their allies, by such a State in association or alliance with a nuclear-weapon State.
So Russia cannot invade Ukraine and interfere in Ukrainian politics.
The United States of America signed and agreed to provide assistance to Ukraine if Ukraine should become a victim of an act of aggression or an object of a threat of aggression in which nuclear weapons are used. So the US is legally binded to help.
The letter was signed by Sergey Lavrov.
The agreement was signed by Boris Yeltsin who was president at that moment.
I added the original document.