how to make AI agents safely autonomous