code: private void initMode(Map<String, String> agentConfig) {
          String mode = agentConfig.get("mode");
          if (mode != null && !mode.equals("start") && !mode.equals("stop")) {
              throw new IllegalArgumentException("Invalid running mode '" + mode + "'. Must be either 'start' or 'stop'");
          }
          isStopMode = "stop".equals(mode);
      }
docs: ==========================================================================================================