started generic agent code