The first is done largely by the great powers agreeing that it's a bad idea from a military standpoint. That is, biological weapons are not stockpiled not because of all the obvious horrible consequences, but because the common wisdom is that they are ineffective weapons.
Keeping nuclear programs in check is mostly done through expense. Everyone who has them has made enough of them to feel safe, and doesn't want to make more because they are really expensive. After states have decided they don't want any more nukes, they sign agreements with each other to make sure no-one else is building a massive stockpile. If any of them wanted a larger stockpile, they would make it.
In general, powerful states can not be limited by agreements. They only ever work as a framework that allows everyone to do what they would have wanted to do anyway, while feeling confident of what everyone else wants to do and how to plan for it. The American obsession of thinking of the UN as world government and international agreements as laws really distorts your view on the world. That is simply not how any of this works.
But regardless of all that, even if broad international agreements would actually work to limit weaponry, it still wouldn't work, because AI is deniable. The initial AI isn't going to replace the pilot, they are going to augment them. And those are developed further until the pilots are no longer needed, and past that. So you can develop all the way to the point where humans have become a detriment, without needing to show your hand. And only deploy completely unmanned platforms once the proverbial shit hits the fan, which is after the point where everyone has stopped caring about international agreements anyway.