Ensuring Quality in Autonomous AI Agents