refactoring of AgentConnection::getList