removed static "setApiKey".
added _getBaseAgentId