Check if api key is added before starting agent