Protecting autonomous AI agents from threats