resolve _loadAgentsPromise with new code