Note: Due to security policy requirements some organizations doesn't allow switching off 'Power and Sleep' mode settings on development/test machines, in that case host your Agent on virtual machine and perform below Power and Sleep mode changes there. Turn off Power and Sleep mode settings will ensure that your agent machine doesn't get locked or goes to sleep mode automatically.
To make sure that agent machine is not locked due to power and sleep mode settings user must perform below two steps: By default windows Powers and Sleep settings are configured in way that screen get locked after specific interval of time.