protecting AI agents from misbehavior