added options agentEveryNrequests and agentMaxSockets