buildAgentInfo - done + archiving old code