private void DeleteAgents()
        {
            try
            {
                using (IAgentManager agentManager = _serviceFactory.CreateProxy <IAgentManager>())
                {
                    AgentUtilities.IAgentHelper agentHelper = new AgentHelper(
                        agentManager: agentManager,
                        sqlDatabaseServerName: TestConstants.InstanceDetails.SQL_SERVER_NAME,
                        sqlDatabaseName: TestConstants.InstanceDetails.SQL_DATABASE_NAME,
                        sqlUsername: TestConstants.InstanceDetails.SQL_USERNAME,
                        sqlPassword: TestConstants.InstanceDetails.SQL_PASSWORD);

                    // Check if Agent exists in the instance
                    List <Agent> agentsList = agentHelper.GetAgentByNameAsync(Helpers.Constants.Names.AGENT_INSTANCE_METRICS_CALCULATOR).Result;

                    if (agentsList.Count > 0)
                    {
                        //Delete Agent(s)
                        Console.WriteLine("Deleting Agent.");
                        List <int> agentArtifactIds = agentsList.Select(x => x.ArtifactID).ToList();
                        agentHelper.DeleteMultipleAgentsAsync(agentArtifactIds).Wait();
                        Console.WriteLine($"Agent(s) Deleted. Count = {agentsList.Count}");
                    }
                    else
                    {
                        Console.WriteLine("Agent(s) doesn't exists in the Instance. Skipped deletion.");
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception("An error encountered while deleting Agents.", ex);
            }
        }